diff options
author | 2016-09-15 09:59:11 -0400 | |
---|---|---|
committer | 2016-09-15 09:59:11 -0400 | |
commit | fc116c063938d5e141d5fbc38e8013d9832ef315 (patch) | |
tree | 382b401cc0a9efeda1509a88bd430cd68b741346 /test/root/option_tmpfs.exp | |
parent | fixed /etc/login.def reading on Mageia systems (diff) | |
download | firejail-fc116c063938d5e141d5fbc38e8013d9832ef315.tar.gz firejail-fc116c063938d5e141d5fbc38e8013d9832ef315.tar.zst firejail-fc116c063938d5e141d5fbc38e8013d9832ef315.zip |
testing
Diffstat (limited to 'test/root/option_tmpfs.exp')
-rwxr-xr-x | test/root/option_tmpfs.exp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/root/option_tmpfs.exp b/test/root/option_tmpfs.exp new file mode 100755 index 000000000..20e42a858 --- /dev/null +++ b/test/root/option_tmpfs.exp | |||
@@ -0,0 +1,44 @@ | |||
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 | expect { | ||
20 | timeout {puts "TESTING ERROR 2\n";exit} | ||
21 | "/root" | ||
22 | } | ||
23 | sleep 1 | ||
24 | send -- "exit\r" | ||
25 | sleep 2 | ||
26 | |||
27 | send -- "firejail --debug-check-filename --tmpfs=\"bla&&bla\"\r" | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 13.1\n";exit} | ||
30 | "Checking filename bla&&bla" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 13.2\n";exit} | ||
34 | "Error:" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 13.3\n";exit} | ||
38 | "is an invalid filename" | ||
39 | } | ||
40 | after 100 | ||
41 | |||
42 | |||
43 | puts "\nall done\n" | ||
44 | |||