diff options
Diffstat (limited to 'test/fs/private-cache.exp')
-rwxr-xr-x | test/fs/private-cache.exp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/test/fs/private-cache.exp b/test/fs/private-cache.exp index 0597e8921..6e4c6bd1b 100755 --- a/test/fs/private-cache.exp +++ b/test/fs/private-cache.exp | |||
@@ -7,16 +7,17 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | if {[file exists ~/.cache]} { | 10 | send -- "mkdir --mode=700 ~/.cache\r" |
11 | puts "found .cache directory\n" | ||
12 | } else { | ||
13 | send -- "mkdir --mode=755 ~/.cache\r" | ||
14 | } | ||
15 | after 100 | 11 | after 100 |
16 | 12 | ||
17 | send -- "touch ~/.cache/abcdefg\r" | 13 | send -- "touch ~/.cache/abcdefg\r" |
18 | after 100 | 14 | after 100 |
19 | 15 | ||
16 | if { ! [file exists ~/.cache/abcdefg] } { | ||
17 | puts "TESTING ERROR 0\n" | ||
18 | exit | ||
19 | } | ||
20 | |||
20 | send -- "firejail --noprofile --private-cache\r" | 21 | send -- "firejail --noprofile --private-cache\r" |
21 | expect { | 22 | expect { |
22 | timeout {puts "TESTING ERROR 1\n";exit} | 23 | timeout {puts "TESTING ERROR 1\n";exit} |
@@ -34,23 +35,8 @@ after 100 | |||
34 | send -- "exit\r" | 35 | send -- "exit\r" |
35 | sleep 1 | 36 | sleep 1 |
36 | 37 | ||
37 | send -- "rm -v ~/.cache/abcdefg\r" | 38 | # cleanup |
38 | expect { | 39 | send -- "rm ~/.cache/abcdefg\r" |
39 | timeout {puts "TESTING ERROR 3\n";exit} | ||
40 | "removed" | ||
41 | } | ||
42 | after 100 | 40 | after 100 |
43 | 41 | ||
44 | # redo the test with --private | ||
45 | |||
46 | send -- "firejail --noprofile --private --private-cache\r" | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 4\n";exit} | ||
49 | "Warning" | ||
50 | } | ||
51 | sleep 1 | ||
52 | |||
53 | send -- "exit\r" | ||
54 | sleep 1 | ||
55 | |||
56 | puts "\nall done\n" | 42 | puts "\nall done\n" |