summaryrefslogtreecommitdiffstats
path: root/test/root/profile_tmpfs.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/profile_tmpfs.exp')
-rwxr-xr-xtest/root/profile_tmpfs.exp37
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
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "mkdir /tmp/firejailtestdir\r"
8sleep 1
9send -- "ls > /tmp/firejailtestdir/tmpfile\r"
10sleep 1
11
12send -- "firejail --profile=tmpfs.profile\r" 7send -- "firejail --profile=tmpfs.profile\r"
13expect { 8expect {
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
19send -- "bash\r"
20sleep 1 12sleep 1
21 13
22send -- "ls -l /tmp/firejailtestdir;pwd\r" 14send -- "ls -l /var;pwd\r"
23expect { 15expect {
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}
28sleep 1 19after 100
29send -- "exit\r"
30sleep 1
31send -- "exit\r" 20send -- "exit\r"
32sleep 1 21sleep 1
33send -- "rm -fr /tmp/firejailtestdir\r"
34 22
35sleep 1 23send -- "firejail --debug-check-filename --profile=tmpfs-bad.profile\r"
24expect {
25 timeout {puts "TESTING ERROR 13.1\n";exit}
26 "Checking filename bla&&bla"
27}
28expect {
29 timeout {puts "TESTING ERROR 13.2\n";exit}
30 "Error:"
31}
32expect {
33 timeout {puts "TESTING ERROR 13.3\n";exit}
34 "is an invalid filename"
35}
36after 100
37
36 38
37puts "\nall done\n" 39puts "\nall done\n"
40