aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/private-whitelist.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/private-whitelist.exp')
-rwxr-xr-xtest/fs/private-whitelist.exp39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/fs/private-whitelist.exp b/test/fs/private-whitelist.exp
new file mode 100755
index 000000000..a3d60369a
--- /dev/null
+++ b/test/fs/private-whitelist.exp
@@ -0,0 +1,39 @@
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 -- "firejail --private --whitelist=/tmp/.X11-unix\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17send -- "ls -al /tmp\r"
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 ".X11-unix"
21}
22sleep 1
23
24send -- "ls -a /tmp | wc -l\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "3"
28}
29sleep 1
30
31send -- "ls -a ~ | wc -l\r"
32expect {
33 timeout {puts "TESTING ERROR 4\n";exit}
34 "5"
35}
36
37sleep 1
38puts "\nall done\n"
39