aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.8.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-02-02 09:34:58 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-02-02 09:34:58 -0500
commit6d1e93c2aea17fa209779e768a57450b06dcfa14 (patch)
tree0456d1493c8ea1e82ce05b239a62855f230f56dd /test/features/3.8.exp
parent0.9.38 testing (diff)
downloadfirejail-6d1e93c2aea17fa209779e768a57450b06dcfa14.tar.gz
firejail-6d1e93c2aea17fa209779e768a57450b06dcfa14.tar.zst
firejail-6d1e93c2aea17fa209779e768a57450b06dcfa14.zip
0.9.38 testing
Diffstat (limited to 'test/features/3.8.exp')
-rwxr-xr-xtest/features/3.8.exp79
1 files changed, 79 insertions, 0 deletions
diff --git a/test/features/3.8.exp b/test/features/3.8.exp
new file mode 100755
index 000000000..72953d159
--- /dev/null
+++ b/test/features/3.8.exp
@@ -0,0 +1,79 @@
1#!/usr/bin/expect -f
2#
3# private-bin
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9set overlay [lindex $argv 0]
10set chroot [lindex $argv 1]
11
12#
13# N
14#
15send -- "firejail --noprofile --private-bin=bash,cat,cp,ls,wc\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20sleep 1
21
22send -- "ls -l /bin | wc -l\r"
23expect {
24 timeout {puts "TESTING ERROR 1.1\n";exit}
25 "6"
26}
27
28
29after 100
30send -- "exit\r"
31sleep 1
32
33#
34# O
35#
36if { $overlay == "overlay" } {
37 send -- "firejail --noprofile --overlay --private-bin=bash,cat,cp,ls,wc\r"
38 expect {
39 timeout {puts "TESTING ERROR 2\n";exit}
40 "Child process initialized"
41 }
42 sleep 1
43
44 send -- "ls -l /bin | wc -l\r"
45 expect {
46 timeout {puts "TESTING ERROR 3.1\n";exit}
47 "6"
48 }
49
50
51 after 100
52 send -- "exit\r"
53 sleep 1
54}
55
56#
57# C
58#
59if { $chroot == "chroot" } {
60 send -- "firejail --noprofile --chroot=/tmp/chroot --private-bin=bash,cat,cp,ls,wc\r"
61 expect {
62 timeout {puts "TESTING ERROR 4\n";exit}
63 "Child process initialized"
64 }
65 sleep 1
66
67 send -- "ls -l /bin | wc -l\r"
68 expect {
69 timeout {puts "TESTING ERROR 5.1\n";exit}
70 "6"
71 }
72
73 after 100
74 send -- "exit\r"
75 sleep 1
76}
77
78
79puts "\nall done\n"