aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/option_blacklist_glob.exp
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@protonmail.com>2021-07-29 07:47:16 -0400
committerLibravatar startx2017 <vradu.startx@protonmail.com>2021-07-29 07:47:16 -0400
commitb4424d947838cc41fc82f1ba9a7c06b8a49f9bae (patch)
tree2ac1fd1d9f2611bd7a19cd78cc76478c2d111125 /test/fs/option_blacklist_glob.exp
parentFixup: Fix Firefox 'Profile not found' - whitelist /run/user/xxx/firefox (diff)
downloadfirejail-b4424d947838cc41fc82f1ba9a7c06b8a49f9bae.tar.gz
firejail-b4424d947838cc41fc82f1ba9a7c06b8a49f9bae.tar.zst
firejail-b4424d947838cc41fc82f1ba9a7c06b8a49f9bae.zip
rework make test-fs
Diffstat (limited to 'test/fs/option_blacklist_glob.exp')
-rwxr-xr-xtest/fs/option_blacklist_glob.exp25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/fs/option_blacklist_glob.exp b/test/fs/option_blacklist_glob.exp
index ee79eabf4..a4be4a97d 100755
--- a/test/fs/option_blacklist_glob.exp
+++ b/test/fs/option_blacklist_glob.exp
@@ -7,26 +7,41 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --blacklist=testdir1/*\r" 10send -- "mkdir ~/_firejail_test_dir\r"
11after 100
12send -- "touch ~/_firejail_test_dir/a\r"
13after 100
14send -- "mkdir ~/_firejail_test_dir/test1\r"
15after 100
16send -- "touch ~/_firejail_test_dir/test1/b\r"
17after 100
18
19send -- "firejail --blacklist=~/_firejail_test_dir/*\r"
11expect { 20expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 22 "Child process initialized"
14} 23}
15sleep 1 24sleep 1
16send -- "cd testdir1\r" 25send -- "cd ~/_firejail_test_dir\r"
17sleep 1 26sleep 1
18 27
19send -- "cat .file\r" 28send -- "cat a\r"
20expect { 29expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 30 timeout {puts "TESTING ERROR 1\n";exit}
22 "Permission denied" 31 "Permission denied"
23} 32}
24 33
25send -- "ls .directory\r" 34send -- "ls test1\r"
26expect { 35expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 36 timeout {puts "TESTING ERROR 2\n";exit}
28 "Permission denied" 37 "Permission denied"
29} 38}
30after 100 39after 100
31 40
32puts "\n" 41send -- "exit\r"
42sleep 1
43
44send -- "rm -fr ~/_firejail_test_dir\r"
45after 100
46
47puts "\nall done\n"