diff options
author | smitsohu <smitsohu@gmail.com> | 2020-11-19 16:15:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 16:15:53 +0100 |
commit | 3fa2d3ea26485f012b55b67449a5b4431e1c6318 (patch) | |
tree | 17c9682c4660c1643232159e7c633bc43320da45 /test | |
parent | add macro, globbing support to --tmpfs option (diff) | |
download | firejail-3fa2d3ea26485f012b55b67449a5b4431e1c6318.tar.gz firejail-3fa2d3ea26485f012b55b67449a5b4431e1c6318.tar.zst firejail-3fa2d3ea26485f012b55b67449a5b4431e1c6318.zip |
tmpfs testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/fs/fscheck-tmpfs.exp | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/test/fs/fscheck-tmpfs.exp b/test/fs/fscheck-tmpfs.exp index ebd3eeb9c..d40b45ece 100755 --- a/test/fs/fscheck-tmpfs.exp +++ b/test/fs/fscheck-tmpfs.exp | |||
@@ -7,12 +7,49 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | # .. | 10 | send -- "mkdir -p ~/fjtest-dir/fjtest-dir\r" |
11 | send -- "firejail --tmpfs=fscheck-dir\r" | 11 | after 100 |
12 | send -- "mkdir -p /tmp/fjtest-dir/fjtest-dir\r" | ||
13 | after 100 | ||
14 | |||
15 | if { ! [file exists ~/fjtest-dir/fjtest-dir] } { | ||
16 | puts "TESTING ERROR 1\n" | ||
17 | exit | ||
18 | } | ||
19 | if { ! [file exists /tmp/fjtest-dir/fjtest-dir] } { | ||
20 | puts "TESTING ERROR 2\n" | ||
21 | exit | ||
22 | } | ||
23 | |||
24 | send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | "Child process initialized" | ||
28 | } | ||
29 | after 500 | ||
30 | |||
31 | send -- "ls -l ~/fjtest-dir\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 4\n";exit} | ||
34 | "total 0" | ||
35 | } | ||
36 | after 500 | ||
37 | |||
38 | send -- "exit\r" | ||
39 | after 500 | ||
40 | |||
41 | send -- "firejail --noprofile --tmpfs=/tmp/fjtest-dir\r" | ||
12 | expect { | 42 | expect { |
13 | timeout {puts "TESTING ERROR 0.1\n";exit} | 43 | timeout {puts "TESTING ERROR 5\n";exit} |
14 | "Error" | 44 | "Error" |
15 | } | 45 | } |
46 | after 500 | ||
47 | |||
48 | # cleanup | ||
49 | send -- "rm -fr ~/fjtest-dir\r" | ||
16 | after 100 | 50 | after 100 |
51 | send -- "rm -fr /tmp/fjtest-dir\r" | ||
52 | after 100 | ||
53 | |||
17 | 54 | ||
18 | puts "\nall done\n" | 55 | puts "\nall done\n" |