diff options
Diffstat (limited to 'test/root/profile_tmpfs.exp')
-rwxr-xr-x | test/root/profile_tmpfs.exp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/test/root/profile_tmpfs.exp b/test/root/profile_tmpfs.exp index da7c084a2..25f73b50b 100755 --- a/test/root/profile_tmpfs.exp +++ b/test/root/profile_tmpfs.exp | |||
@@ -4,34 +4,37 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "mkdir /tmp/firejailtestdir\r" | ||
8 | sleep 1 | ||
9 | send -- "ls > /tmp/firejailtestdir/tmpfile\r" | ||
10 | sleep 1 | ||
11 | |||
12 | send -- "firejail --profile=tmpfs.profile\r" | 7 | send -- "firejail --profile=tmpfs.profile\r" |
13 | expect { | 8 | expect { |
14 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
15 | "Child process initialized" | 10 | "Child process initialized" |
16 | } | 11 | } |
17 | |||
18 | # testing private only | ||
19 | send -- "bash\r" | ||
20 | sleep 1 | 12 | sleep 1 |
21 | 13 | ||
22 | send -- "ls -l /tmp/firejailtestdir;pwd\r" | 14 | send -- "ls -l /var;pwd\r" |
23 | expect { | 15 | expect { |
24 | timeout {puts "TESTING ERROR 1.1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
25 | "tmpfile" {puts "TESTING ERROR 1\n";exit} | 17 | "total 0" |
26 | "home" | ||
27 | } | 18 | } |
28 | sleep 1 | 19 | after 100 |
29 | send -- "exit\r" | ||
30 | sleep 1 | ||
31 | send -- "exit\r" | 20 | send -- "exit\r" |
32 | sleep 1 | 21 | sleep 1 |
33 | send -- "rm -fr /tmp/firejailtestdir\r" | ||
34 | 22 | ||
35 | sleep 1 | 23 | send -- "firejail --debug-check-filename --profile=tmpfs-bad.profile\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 | |||
36 | 38 | ||
37 | puts "\nall done\n" | 39 | puts "\nall done\n" |
40 | |||