aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/private-lib.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/private-lib.exp')
-rwxr-xr-xtest/fs/private-lib.exp44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp
new file mode 100755
index 000000000..dd418da0f
--- /dev/null
+++ b/test/fs/private-lib.exp
@@ -0,0 +1,44 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2017 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo \r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15after 100
16
17send -- "find /bin; echo done\r"
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 "rm" {puts "TESTING ERROR 3\n";exit}
21 "cp" {puts "TESTING ERROR 4\n";exit}
22 "done"
23}
24after 100
25
26send -- "find /lib; echo done\r"
27expect {
28 timeout {puts "TESTING ERROR 5\n";exit}
29 "modules" {puts "TESTING ERROR 6\n";exit}
30 "firmware" {puts "TESTING ERROR 7\n";exit}
31 "libc.so"
32}
33after 100
34
35send -- "find /usr/lib; echo done\r"
36expect {
37 timeout {puts "TESTING ERROR 8\n";exit}
38 "grub" {puts "TESTING ERROR 9\n";exit}
39 "mozilla" {puts "TESTING ERROR 10\n";exit}
40 "libdl.so"
41}
42after 100
43
44puts "\nall done\n"