diff options
Diffstat (limited to 'test/root/option_tmpfs.exp')
-rwxr-xr-x | test/root/option_tmpfs.exp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/root/option_tmpfs.exp b/test/root/option_tmpfs.exp new file mode 100755 index 000000000..3d492dfdb --- /dev/null +++ b/test/root/option_tmpfs.exp | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --tmpfs=/var\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "ls -l /var;pwd\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "total 0" | ||
18 | } | ||
19 | after 100 | ||
20 | send -- "exit\r" | ||
21 | sleep 1 | ||
22 | |||
23 | send -- "firejail --debug-check-filename --tmpfs=\"bla&&bla\"\r" | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 13.1\n";exit} | ||
26 | "Checking filename bla&&bla" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 13.2\n";exit} | ||
30 | "Error:" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 13.3\n";exit} | ||
34 | "is an invalid filename" | ||
35 | } | ||
36 | after 100 | ||
37 | |||
38 | |||
39 | puts "\nall done\n" | ||
40 | |||