diff options
Diffstat (limited to 'test/whitelist-empty.exp')
-rwxr-xr-x | test/whitelist-empty.exp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/whitelist-empty.exp b/test/whitelist-empty.exp new file mode 100755 index 000000000..226b019db --- /dev/null +++ b/test/whitelist-empty.exp | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 30 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --whitelist=~/blablabla --whitelist=/tmp/blablabla --whitelist=/media/blablabla --whitelist=/var/blablabla --whitelist=/dev/blablabla --whitelist=/opt/blablabla\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "ls -l ~/ | wc -l\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "0" | ||
18 | } | ||
19 | |||
20 | send -- "ls -l /tmp | wc -l\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 2\n";exit} | ||
23 | "0" | ||
24 | } | ||
25 | |||
26 | send -- "ls -l /media | wc -l\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 3\n";exit} | ||
29 | "0" | ||
30 | } | ||
31 | |||
32 | send -- "ls -l /var | wc -l\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 4\n";exit} | ||
35 | "0" | ||
36 | } | ||
37 | |||
38 | send -- "ls -l /dev | wc -l\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 5\n";exit} | ||
41 | "0" | ||
42 | } | ||
43 | send -- "ls -l /opt | wc -l\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 6\n";exit} | ||
46 | "0" | ||
47 | } | ||
48 | |||
49 | |||
50 | puts "\nall done\n" | ||