diff options
author | netblue30 <netblue30@yahoo.com> | 2015-11-15 13:18:52 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-11-15 13:18:52 -0500 |
commit | 27637c0fcdf34559b37490f56142e283f1ebf0bb (patch) | |
tree | 7d97be0f26bd92174bf3507bb41bff32d62c45ff /test/servers4.exp | |
parent | server testing (diff) | |
download | firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.tar.gz firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.tar.zst firejail-27637c0fcdf34559b37490f56142e283f1ebf0bb.zip |
servers testing
Diffstat (limited to 'test/servers4.exp')
-rwxr-xr-x | test/servers4.exp | 46 |
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 | ||
3 | set timeout 10 | 3 | set timeout 5 |
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
@@ -10,23 +10,49 @@ expect { | |||
10 | "root" | 10 | "root" |
11 | } | 11 | } |
12 | 12 | ||
13 | send -- "firejail --net=br0 --ip=10.10.20.5 --seccomp\r" | 13 | send -- "pkill dhcpd\r" |
14 | sleep 2 | ||
15 | |||
16 | send -- "firejail --name=dhcpd /etc/init.d/isc-dhcp-server start\r" | ||
14 | expect { | 17 | expect { |
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 | } |
18 | sleep 2 | 21 | sleep 2 |
19 | 22 | ||
20 | send -- "/etc/init.d/isc-dhcp-server start\r" | 23 | spawn $env(SHELL) |
21 | sleep 5 | 24 | send -- "firejail --tree\r" |
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "root:/usr/sbin/dhcpd" | ||
28 | } | ||
29 | sleep 2 | ||
30 | |||
31 | send -- "tail -n 200 /var/log/syslog\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3\n";exit} | ||
34 | "Internet Systems Consortium DHCP Server" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 4\n";exit} | ||
38 | "Wrote 0 leases to leases file" | ||
39 | } | ||
40 | sleep 2 | ||
22 | 41 | ||
42 | send -- "firejail --join=dhcpd\r" | ||
43 | sleep 2 | ||
23 | 44 | ||
24 | send -- "ps aux; pwd\r" | 45 | send -- "ls /dev\r" |
25 | expect { | 46 | expect { |
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 | } |
54 | sleep 2 | ||
55 | |||
56 | |||
57 | puts "\nall done\n" | ||
29 | 58 | ||
30 | send -- "exit\r" | ||
31 | sleep 1 | ||
32 | puts "\n" | ||