aboutsummaryrefslogtreecommitdiffstats
path: root/test/servers2.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-11-15 13:18:52 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-11-15 13:18:52 -0500
commit27637c0fcdf34559b37490f56142e283f1ebf0bb (patch)
tree7d97be0f26bd92174bf3507bb41bff32d62c45ff /test/servers2.exp
parentserver testing (diff)
downloadfirejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.tar.gz
firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.tar.zst
firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.zip
servers testing
Diffstat (limited to 'test/servers2.exp')
-rwxr-xr-xtest/servers2.exp42
1 files changed, 34 insertions, 8 deletions
diff --git a/test/servers2.exp b/test/servers2.exp
index 28bcae207..90e34470f 100755
--- a/test/servers2.exp
+++ b/test/servers2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2 2
3set timeout 10 3set timeout 5
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
@@ -10,22 +10,48 @@ expect {
10 "root" 10 "root"
11} 11}
12 12
13send -- "firejail --net=br0 --ip=10.10.20.5--seccomp\r" 13send -- "pkill snmpd\r"
14sleep 2
15
16
17send -- "firejail --name=snmpd /etc/init.d/snmpd start\r"
14expect { 18expect {
15 timeout {puts "TESTING ERROR 0\n";exit} 19 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized" 20 "Child process initialized"
17} 21}
18sleep 2 22sleep 2
19 23
20send -- "/etc/init.d/snmpd start" 24spawn $env(SHELL)
25send -- "firejail --tree\r"
26expect {
27 timeout {puts "TESTING ERROR 2\n";exit}
28 "snmp:/usr/sbin/snmpd"
29}
21sleep 2 30sleep 2
22 31
23send -- "ps aux; pwd\r" 32send -- "tail /var/log/syslog\r"
24expect { 33expect {
25 timeout {puts "TESTING ERROR 1\n";exit} 34 timeout {puts "TESTING ERROR 3\n";exit}
26 "snmpd" 35 "snmpd"
27} 36}
37expect {
38 timeout {puts "TESTING ERROR 4\n";exit}
39 "NET-SNMP version"
40}
28 41
29send -- "exit\r" 42send -- "firejail --join=snmpd\r"
30sleep 1 43sleep 2
31puts "\n" 44
45send -- "ls /dev\r"
46expect {
47 timeout {puts "TESTING ERROR 5\n";exit}
48 "tty0" {puts "TESTING ERROR 6\n";exit}
49 "ttyS0" {puts "TESTING ERROR 6\n";exit}
50 "audio" {puts "TESTING ERROR 6\n";exit}
51 "ppp" {puts "TESTING ERROR 6\n";exit}
52 "log"
53}
54sleep 2
55
56sleep 2
57puts "\nall done\n"