diff options
Diffstat (limited to 'test/fs/private-etc-empty.exp')
-rwxr-xr-x | test/fs/private-etc-empty.exp | 38 |
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 | |||
6 | set timeout 30 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --private-etc=blablabla\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | send -- "ls -l /etc | wc -l\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "0" | ||
21 | } | ||
22 | send -- "exit\r" | ||
23 | sleep 1 | ||
24 | |||
25 | send -- "firejail --profile=private-etc-empty.profile\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 0\n";exit} | ||
28 | "Child process initialized" | ||
29 | } | ||
30 | sleep 1 | ||
31 | |||
32 | send -- "ls -l /etc | wc -l\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 1\n";exit} | ||
35 | "0" | ||
36 | } | ||
37 | |||
38 | puts "\nall done\n" | ||