aboutsummaryrefslogtreecommitdiffstats
path: root/test/blacklist.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-20 09:06:07 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-20 09:06:07 -0400
commitcb585cc82af4318a888470a7da82cc89dd01774d (patch)
treeac68cbaa7f0464f097135984e55f2b2596497e8a /test/blacklist.exp
parentMerge pull request #34 from pmillerchip/make-install (diff)
downloadfirejail-cb585cc82af4318a888470a7da82cc89dd01774d.tar.gz
firejail-cb585cc82af4318a888470a7da82cc89dd01774d.tar.zst
firejail-cb585cc82af4318a888470a7da82cc89dd01774d.zip
testing
Diffstat (limited to 'test/blacklist.exp')
-rwxr-xr-xtest/blacklist.exp76
1 files changed, 76 insertions, 0 deletions
diff --git a/test/blacklist.exp b/test/blacklist.exp
new file mode 100755
index 000000000..70012d167
--- /dev/null
+++ b/test/blacklist.exp
@@ -0,0 +1,76 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# directory with ~
8send -- "firejail --blacklist=~/.config\r"
9expect {
10 timeout {puts "TESTING ERROR 1\n";exit}
11 "Child process initialized"
12}
13sleep 1
14
15send -- "ls -al ~/.config\r"
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "cannot open directory"
19}
20
21send -- "exit\r"
22sleep 1
23
24# directory with ~ in profile file
25send -- "firejail --profile=blacklist1.profile\r"
26expect {
27 timeout {puts "TESTING ERROR 3\n";exit}
28 "Child process initialized"
29}
30sleep 1
31
32send -- "ls -al ~/.config\r"
33expect {
34 timeout {puts "TESTING ERROR 4\n";exit}
35 "cannot open directory"
36}
37
38send -- "exit\r"
39sleep 1
40
41
42# directory with space
43send -- "firejail \"--blacklist=dir with space\"\r"
44expect {
45 timeout {puts "TESTING ERROR 5\n";exit}
46 "Child process initialized"
47}
48sleep 1
49
50send -- "ls -al \"dir with space\"\r"
51expect {
52 timeout {puts "TESTING ERROR 6\n";exit}
53 "cannot open directory"
54}
55
56send -- "exit\r"
57sleep 1
58
59# directory with space in profile
60send -- "firejail --profile=blacklist2.profile\r"
61expect {
62 timeout {puts "TESTING ERROR 7\n";exit}
63 "Child process initialized"
64}
65sleep 1
66
67send -- "ls -al \"dir with space\"\r"
68expect {
69 timeout {puts "TESTING ERROR 8\n";exit}
70 "cannot open directory"
71}
72
73
74
75puts "\n"
76