aboutsummaryrefslogtreecommitdiffstats
path: root/test/servers4.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/servers4.exp
parentserver testing (diff)
downloadfirejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.tar.gz
firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.tar.zst
firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.zip
servers testing
Diffstat (limited to 'test/servers4.exp')
-rwxr-xr-xtest/servers4.exp46
1 files changed, 36 insertions, 10 deletions
diff --git a/test/servers4.exp b/test/servers4.exp
index 9feeecf61..86500707a 100755
--- a/test/servers4.exp
+++ b/test/servers4.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,23 +10,49 @@ expect {
10 "root" 10 "root"
11} 11}
12 12
13send -- "firejail --net=br0 --ip=10.10.20.5 --seccomp\r" 13send -- "pkill dhcpd\r"
14sleep 2
15
16send -- "firejail --name=dhcpd /etc/init.d/isc-dhcp-server start\r"
14expect { 17expect {
15 timeout {puts "TESTING ERROR 0\n";exit} 18 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized" 19 "Child process initialized"
17} 20}
18sleep 2 21sleep 2
19 22
20send -- "/etc/init.d/isc-dhcp-server start\r" 23spawn $env(SHELL)
21sleep 5 24send -- "firejail --tree\r"
25expect {
26 timeout {puts "TESTING ERROR 2\n";exit}
27 "root:/usr/sbin/dhcpd"
28}
29sleep 2
30
31send -- "tail -n 200 /var/log/syslog\r"
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 "Internet Systems Consortium DHCP Server"
35}
36expect {
37 timeout {puts "TESTING ERROR 4\n";exit}
38 "Wrote 0 leases to leases file"
39}
40sleep 2
22 41
42send -- "firejail --join=dhcpd\r"
43sleep 2
23 44
24send -- "ps aux; pwd\r" 45send -- "ls /dev\r"
25expect { 46expect {
26 timeout {puts "TESTING ERROR 1\n";exit} 47 timeout {puts "TESTING ERROR 5\n";exit}
27 "dhcpd" 48 "tty0" {puts "TESTING ERROR 6\n";exit}
49 "ttyS0" {puts "TESTING ERROR 6\n";exit}
50 "ppp" {puts "TESTING ERROR 6\n";exit}
51 "audio" {puts "TESTING ERROR 6\n";exit}
52 "log"
28} 53}
54sleep 2
55
56
57puts "\nall done\n"
29 58
30send -- "exit\r"
31sleep 1
32puts "\n"