aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.6.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-02-02 09:10:55 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-02-02 09:10:55 -0500
commit09e3fdc601c6db7a3d14ce1ec107abf91ef39ed9 (patch)
tree4fdc051676edbb4e48327fa5e4b260cf6d402fe6 /test/features/3.6.exp
parent0.9.38 testing (diff)
downloadfirejail-09e3fdc601c6db7a3d14ce1ec107abf91ef39ed9.tar.gz
firejail-09e3fdc601c6db7a3d14ce1ec107abf91ef39ed9.tar.zst
firejail-09e3fdc601c6db7a3d14ce1ec107abf91ef39ed9.zip
0.9.38 testing
Diffstat (limited to 'test/features/3.6.exp')
-rwxr-xr-xtest/features/3.6.exp77
1 files changed, 77 insertions, 0 deletions
diff --git a/test/features/3.6.exp b/test/features/3.6.exp
new file mode 100755
index 000000000..6117485da
--- /dev/null
+++ b/test/features/3.6.exp
@@ -0,0 +1,77 @@
1#!/usr/bin/expect -f
2#
3# private-etc
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-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20sleep 1
21
22send -- "ls -al /etc | wc -l\r"
23expect {
24 timeout {puts "TESTING ERROR 1.1\n";exit}
25 "10"
26}
27
28after 100
29send -- "exit\r"
30sleep 1
31
32#
33# O
34#
35if { $overlay == "overlay" } {
36 send -- "firejail --noprofile --overlay --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r"
37 expect {
38 timeout {puts "TESTING ERROR 2\n";exit}
39 "Child process initialized"
40 }
41 sleep 1
42
43 send -- "ls -al /etc | wc -l\r"
44 expect {
45 timeout {puts "TESTING ERROR 3.1\n";exit}
46 "10"
47 }
48
49 after 100
50 send -- "exit\r"
51 sleep 1
52}
53
54#
55# C
56#
57if { $chroot == "chroot" } {
58 send -- "firejail --noprofile --chroot=/tmp/chroot --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r"
59 expect {
60 timeout {puts "TESTING ERROR 4\n";exit}
61 "Child process initialized"
62 }
63 sleep 1
64
65 send -- "ls -al /etc | wc -l\r"
66 expect {
67 timeout {puts "TESTING ERROR 5.1\n";exit}
68 "10"
69 }
70
71 after 100
72 send -- "exit\r"
73 sleep 1
74}
75
76
77puts "\nall done\n"