summaryrefslogtreecommitdiffstats
path: root/test/root/whitelist-mnt.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/whitelist-mnt.exp')
-rwxr-xr-xtest/root/whitelist-mnt.exp105
1 files changed, 0 insertions, 105 deletions
diff --git a/test/root/whitelist-mnt.exp b/test/root/whitelist-mnt.exp
deleted file mode 100755
index a21446afe..000000000
--- a/test/root/whitelist-mnt.exp
+++ /dev/null
@@ -1,105 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "touch /mnt/firejail-test-file\r"
11after 100
12send -- "firejail --whitelist=/mnt/firejail-test-file --debug\r"
13expect {
14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized"
16}
17sleep 1
18
19send -- "find /mnt | wc -l\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "2"
23}
24after 100
25send -- "exit\r"
26sleep 1
27
28
29send -- "touch /opt/firejail-test-file\r"
30after 100
31send -- "firejail --whitelist=/opt/firejail-test-file --debug\r"
32expect {
33 timeout {puts "TESTING ERROR 0\n";exit}
34 "Child process initialized"
35}
36sleep 1
37
38send -- "find /opt | wc -l\r"
39expect {
40 timeout {puts "TESTING ERROR 1\n";exit}
41 "2"
42}
43after 100
44send -- "exit\r"
45sleep 1
46
47send -- "touch /media/firejail-test-file\r"
48after 100
49send -- "firejail --whitelist=/media/firejail-test-file --debug\r"
50expect {
51 timeout {puts "TESTING ERROR 0\n";exit}
52 "Child process initialized"
53}
54sleep 1
55
56send -- "find /media | wc -l\r"
57expect {
58 timeout {puts "TESTING ERROR 1\n";exit}
59 "2"
60}
61after 100
62send -- "exit\r"
63sleep 1
64
65
66send -- "firejail --whitelist=/var/run --whitelist=/var/lock --debug\r"
67expect {
68 timeout {puts "TESTING ERROR 0\n";exit}
69 "Child process initialized"
70}
71sleep 1
72
73send -- "find /var | wc -l\r"
74expect {
75 timeout {puts "TESTING ERROR 1\n";exit}
76 ""
77}
78after 100
79send -- "exit\r"
80sleep 1
81
82send -- "touch /srv/firejail-test-file\r"
83after 100
84send -- "firejail --whitelist=/srv/firejail-test-file --debug\r"
85expect {
86 timeout {puts "TESTING ERROR 0\n";exit}
87 "Child process initialized"
88}
89sleep 1
90
91send -- "find /srv | wc -l\r"
92expect {
93 timeout {puts "TESTING ERROR 1\n";exit}
94 "2"
95}
96after 100
97send -- "exit\r"
98sleep 1
99
100
101
102
103after 100
104puts "\nall done\n"
105