diff options
author | netblue30 <netblue30@yahoo.com> | 2015-11-24 11:11:04 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-11-24 11:11:04 -0500 |
commit | 12317dbbf67c1adcaf0d4fec267896d5951d8418 (patch) | |
tree | 6c93a0ad98ebeaffca02fc22b79e9b4ec61b01ec /test/features/2.6.exp | |
parent | fixes (diff) | |
download | firejail-12317dbbf67c1adcaf0d4fec267896d5951d8418.tar.gz firejail-12317dbbf67c1adcaf0d4fec267896d5951d8418.tar.zst firejail-12317dbbf67c1adcaf0d4fec267896d5951d8418.zip |
feature test
Diffstat (limited to 'test/features/2.6.exp')
-rwxr-xr-x | test/features/2.6.exp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/test/features/2.6.exp b/test/features/2.6.exp new file mode 100755 index 000000000..dc2381393 --- /dev/null +++ b/test/features/2.6.exp | |||
@@ -0,0 +1,68 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # default gateway | ||
4 | # | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # | ||
11 | # N | ||
12 | # | ||
13 | send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 0\n";exit} | ||
16 | "Child process initialized" | ||
17 | } | ||
18 | sleep 1 | ||
19 | |||
20 | send -- "netstat -rn\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 1\n";exit} | ||
23 | "0.0.0.0 192.168.1.10" | ||
24 | } | ||
25 | after 100 | ||
26 | send -- "exit\r" | ||
27 | sleep 1 | ||
28 | |||
29 | # | ||
30 | # O | ||
31 | # | ||
32 | send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 2\n";exit} | ||
35 | "Child process initialized" | ||
36 | } | ||
37 | sleep 1 | ||
38 | |||
39 | send -- "netstat -rn\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 3\n";exit} | ||
42 | "0.0.0.0 192.168.1.10" | ||
43 | } | ||
44 | after 100 | ||
45 | send -- "exit\r" | ||
46 | sleep 1 | ||
47 | |||
48 | # | ||
49 | # C | ||
50 | # | ||
51 | send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 4\n";exit} | ||
54 | "Child process initialized" | ||
55 | } | ||
56 | sleep 1 | ||
57 | |||
58 | send -- "netstat -rn\r" | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 5\n";exit} | ||
61 | "0.0.0.0 192.168.1.10" | ||
62 | } | ||
63 | after 100 | ||
64 | send -- "exit\r" | ||
65 | sleep 1 | ||
66 | |||
67 | |||
68 | puts "\nall done\n" | ||