aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/private-etc-empty.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/private-etc-empty.exp')
-rwxr-xr-xtest/fs/private-etc-empty.exp38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/fs/private-etc-empty.exp b/test/fs/private-etc-empty.exp
new file mode 100755
index 000000000..13e917a5c
--- /dev/null
+++ b/test/fs/private-etc-empty.exp
@@ -0,0 +1,38 @@
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 30
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --private-etc=blablabla\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17send -- "ls -l /etc | wc -l\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "0"
21}
22send -- "exit\r"
23sleep 1
24
25send -- "firejail --profile=private-etc-empty.profile\r"
26expect {
27 timeout {puts "TESTING ERROR 0\n";exit}
28 "Child process initialized"
29}
30sleep 1
31
32send -- "ls -l /etc | wc -l\r"
33expect {
34 timeout {puts "TESTING ERROR 1\n";exit}
35 "0"
36}
37
38puts "\nall done\n"