diff options
author | smitsohu <smitsohu@gmail.com> | 2019-09-26 10:59:26 +0200 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2019-09-26 10:59:26 +0200 |
commit | b9888e6a388b7d2c17f0aa75b2ef5205b4b90720 (patch) | |
tree | b17e2d4430e1118e34f4f9764f082d30e309384e /test/fs/noblacklist-blacklist-readonly.exp | |
parent | testing: rename and simplify (diff) | |
download | firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.tar.gz firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.tar.zst firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.zip |
testing
Diffstat (limited to 'test/fs/noblacklist-blacklist-readonly.exp')
-rwxr-xr-x | test/fs/noblacklist-blacklist-readonly.exp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/fs/noblacklist-blacklist-readonly.exp b/test/fs/noblacklist-blacklist-readonly.exp new file mode 100755 index 000000000..c31bd6948 --- /dev/null +++ b/test/fs/noblacklist-blacklist-readonly.exp | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2019 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | |||
11 | send -- "firejail --noprofile --noblacklist=~ --blacklist=~ --read-only=~\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | send -- "ls ~\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 1\n";exit} | ||
21 | "Downloads" | ||
22 | } | ||
23 | after 100 | ||
24 | |||
25 | send -- "echo World > ~/Hello\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 2\n";exit} | ||
28 | "Read-only file system" | ||
29 | } | ||
30 | after 100 | ||
31 | |||
32 | send -- "exit\r" | ||
33 | sleep 1 | ||
34 | |||
35 | puts "\nall done\n" | ||