aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.11.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.11.exp')
-rwxr-xr-xtest/features/3.11.exp164
1 files changed, 164 insertions, 0 deletions
diff --git a/test/features/3.11.exp b/test/features/3.11.exp
new file mode 100755
index 000000000..aeaf28bf8
--- /dev/null
+++ b/test/features/3.11.exp
@@ -0,0 +1,164 @@
1#!/usr/bin/expect -f
2#
3# mkdir
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 -- "rm -fr ~/firejail-xy76_u9\r"
16sleep 1
17
18send -- "firejail --profile=3.11.profile\r"
19expect {
20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized"
22}
23sleep 1
24
25send -- "ls -l ~ | grep xy76_u9\r"
26expect {
27 timeout {puts "TESTING ERROR 1\n";exit}
28 "drwx------"
29}
30expect {
31 timeout {puts "TESTING ERROR 2\n";exit}
32 "netblue netblue"
33}
34expect {
35 timeout {puts "TESTING ERROR 3\n";exit}
36 "firejail-xy76_u9"
37}
38after 100
39
40send -- "ls -l ~/firejail-xy76_u9\r"
41expect {
42 timeout {puts "TESTING ERROR 4\n";exit}
43 "drwx------"
44}
45expect {
46 timeout {puts "TESTING ERROR 5\n";exit}
47 "netblue netblue"
48}
49expect {
50 timeout {puts "TESTING ERROR 6\n";exit}
51 "testdir"
52}
53after 100
54
55send -- "exit\r"
56sleep 1
57send -- "rm -fr ~/firejail-xy76_u9\r"
58sleep 1
59
60#
61# O
62#
63if { $overlay == "overlay" } {
64 send -- "rm -fr ~/firejail-xy76_u9\r"
65 sleep 1
66
67 send -- "firejail --profile=3.11.profile\r"
68 expect {
69 timeout {puts "TESTING ERROR 10\n";exit}
70 "Child process initialized"
71 }
72 sleep 1
73
74 send -- "ls -l ~ | grep xy76_u9\r"
75 expect {
76 timeout {puts "TESTING ERROR 11\n";exit}
77 "drwx------"
78 }
79 expect {
80 timeout {puts "TESTING ERROR 12\n";exit}
81 "netblue netblue"
82 }
83 expect {
84 timeout {puts "TESTING ERROR 13\n";exit}
85 "firejail-xy76_u9"
86 }
87 after 100
88
89 send -- "ls -l ~/firejail-xy76_u9\r"
90 expect {
91 timeout {puts "TESTING ERROR 14\n";exit}
92 "drwx------"
93 }
94 expect {
95 timeout {puts "TESTING ERROR 15\n";exit}
96 "netblue netblue"
97 }
98 expect {
99 timeout {puts "TESTING ERROR 16\n";exit}
100 "testdir"
101 }
102 after 100
103
104 send -- "exit\r"
105 sleep 1
106 send -- "rm -fr ~/firejail-xy76_u9\r"
107 sleep 1
108
109
110}
111
112#
113# C
114#
115if { $chroot == "chroot" } {
116 send -- "rm -fr ~/firejail-xy76_u9\r"
117 sleep 1
118
119 send -- "firejail --profile=3.11.profile\r"
120 expect {
121 timeout {puts "TESTING ERROR 20\n";exit}
122 "Child process initialized"
123 }
124 sleep 1
125
126 send -- "ls -l ~ | grep xy76_u9\r"
127 expect {
128 timeout {puts "TESTING ERROR 21\n";exit}
129 "drwx------"
130 }
131 expect {
132 timeout {puts "TESTING ERROR 22\n";exit}
133 "netblue netblue"
134 }
135 expect {
136 timeout {puts "TESTING ERROR 23\n";exit}
137 "firejail-xy76_u9"
138 }
139 after 100
140
141 send -- "ls -l ~/firejail-xy76_u9\r"
142 expect {
143 timeout {puts "TESTING ERROR 24\n";exit}
144 "drwx------"
145 }
146 expect {
147 timeout {puts "TESTING ERROR 25\n";exit}
148 "netblue netblue"
149 }
150 expect {
151 timeout {puts "TESTING ERROR 26\n";exit}
152 "testdir"
153 }
154 after 100
155
156 send -- "rm -fr ~/firejail-xy76_u9\r"
157 sleep 1
158
159 send -- "exit\r"
160
161}
162
163
164puts "\nall done\n"