aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/option_blacklist_file.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_file.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_file.exp')
-rwxr-xr-xtest/fs/option_blacklist_file.exp25
1 files changed, 23 insertions, 2 deletions
diff --git a/test/fs/option_blacklist_file.exp b/test/fs/option_blacklist_file.exp
index b0bcc741b..247e69121 100755
--- a/test/fs/option_blacklist_file.exp
+++ b/test/fs/option_blacklist_file.exp
@@ -7,7 +7,12 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --blacklist=/etc/passwd\r" 10send -- "mkdir ~/_firejail_test_dir\r"
11after 100
12send -- "touch ~/_firejail_test_dir/a\r"
13after 100
14
15send -- "firejail --blacklist=/etc/passwd --blacklist=~/_firejail_test_dir\r"
11expect { 16expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 17 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 18 "Child process initialized"
@@ -17,6 +22,16 @@ sleep 1
17send -- "cat /etc/passwd;echo done\r" 22send -- "cat /etc/passwd;echo done\r"
18expect { 23expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 24 timeout {puts "TESTING ERROR 1\n";exit}
25 "No such file or directory"
26}
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "done"
30}
31after 100
32send -- "cat ~/_firejail_test_dir/a;echo done\r"
33expect {
34 timeout {puts "TESTING ERROR 1\n";exit}
20 "Permission denied" 35 "Permission denied"
21} 36}
22expect { 37expect {
@@ -25,4 +40,10 @@ expect {
25} 40}
26after 100 41after 100
27 42
28puts "\n" 43send -- "exit\r"
44sleep 1
45
46send -- "rm -fr ~/_firejail_test_dir\r"
47after 100
48
49puts "\nall done\n"