aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2020-11-19 16:15:53 +0100
committerLibravatar GitHub <noreply@github.com>2020-11-19 16:15:53 +0100
commit3fa2d3ea26485f012b55b67449a5b4431e1c6318 (patch)
tree17c9682c4660c1643232159e7c633bc43320da45 /test
parentadd macro, globbing support to --tmpfs option (diff)
downloadfirejail-3fa2d3ea26485f012b55b67449a5b4431e1c6318.tar.gz
firejail-3fa2d3ea26485f012b55b67449a5b4431e1c6318.tar.zst
firejail-3fa2d3ea26485f012b55b67449a5b4431e1c6318.zip
tmpfs testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/fs/fscheck-tmpfs.exp43
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
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10# .. 10send -- "mkdir -p ~/fjtest-dir/fjtest-dir\r"
11send -- "firejail --tmpfs=fscheck-dir\r" 11after 100
12send -- "mkdir -p /tmp/fjtest-dir/fjtest-dir\r"
13after 100
14
15if { ! [file exists ~/fjtest-dir/fjtest-dir] } {
16 puts "TESTING ERROR 1\n"
17 exit
18}
19if { ! [file exists /tmp/fjtest-dir/fjtest-dir] } {
20 puts "TESTING ERROR 2\n"
21 exit
22}
23
24send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "Child process initialized"
28}
29after 500
30
31send -- "ls -l ~/fjtest-dir\r"
32expect {
33 timeout {puts "TESTING ERROR 4\n";exit}
34 "total 0"
35}
36after 500
37
38send -- "exit\r"
39after 500
40
41send -- "firejail --noprofile --tmpfs=/tmp/fjtest-dir\r"
12expect { 42expect {
13 timeout {puts "TESTING ERROR 0.1\n";exit} 43 timeout {puts "TESTING ERROR 5\n";exit}
14 "Error" 44 "Error"
15} 45}
46after 500
47
48# cleanup
49send -- "rm -fr ~/fjtest-dir\r"
16after 100 50after 100
51send -- "rm -fr /tmp/fjtest-dir\r"
52after 100
53
17 54
18puts "\nall done\n" 55puts "\nall done\n"