diff options
author | startx2017 <vradu.startx@protonmail.com> | 2021-07-29 07:47:16 -0400 |
---|---|---|
committer | startx2017 <vradu.startx@protonmail.com> | 2021-07-29 07:47:16 -0400 |
commit | b4424d947838cc41fc82f1ba9a7c06b8a49f9bae (patch) | |
tree | 2ac1fd1d9f2611bd7a19cd78cc76478c2d111125 /test/fs/option_blacklist_glob.exp | |
parent | Fixup: Fix Firefox 'Profile not found' - whitelist /run/user/xxx/firefox (diff) | |
download | firejail-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-x | test/fs/option_blacklist_glob.exp | 25 |
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 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail --blacklist=testdir1/*\r" | 10 | send -- "mkdir ~/_firejail_test_dir\r" |
11 | after 100 | ||
12 | send -- "touch ~/_firejail_test_dir/a\r" | ||
13 | after 100 | ||
14 | send -- "mkdir ~/_firejail_test_dir/test1\r" | ||
15 | after 100 | ||
16 | send -- "touch ~/_firejail_test_dir/test1/b\r" | ||
17 | after 100 | ||
18 | |||
19 | send -- "firejail --blacklist=~/_firejail_test_dir/*\r" | ||
11 | expect { | 20 | expect { |
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 | } |
15 | sleep 1 | 24 | sleep 1 |
16 | send -- "cd testdir1\r" | 25 | send -- "cd ~/_firejail_test_dir\r" |
17 | sleep 1 | 26 | sleep 1 |
18 | 27 | ||
19 | send -- "cat .file\r" | 28 | send -- "cat a\r" |
20 | expect { | 29 | expect { |
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 | ||
25 | send -- "ls .directory\r" | 34 | send -- "ls test1\r" |
26 | expect { | 35 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 36 | timeout {puts "TESTING ERROR 2\n";exit} |
28 | "Permission denied" | 37 | "Permission denied" |
29 | } | 38 | } |
30 | after 100 | 39 | after 100 |
31 | 40 | ||
32 | puts "\n" | 41 | send -- "exit\r" |
42 | sleep 1 | ||
43 | |||
44 | send -- "rm -fr ~/_firejail_test_dir\r" | ||
45 | after 100 | ||
46 | |||
47 | puts "\nall done\n" | ||