aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.3.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-11-22 21:50:28 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-11-22 21:50:28 -0500
commit1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b (patch)
treeec8782a9924ee48266b58e342d3c11dcc971d528 /test/features/2.3.exp
parentfeature testing (diff)
downloadfirejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.tar.gz
firejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.tar.zst
firejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.zip
feature testing
Diffstat (limited to 'test/features/2.3.exp')
-rwxr-xr-xtest/features/2.3.exp309
1 files changed, 309 insertions, 0 deletions
diff --git a/test/features/2.3.exp b/test/features/2.3.exp
new file mode 100755
index 000000000..a70005781
--- /dev/null
+++ b/test/features/2.3.exp
@@ -0,0 +1,309 @@
1#!/usr/bin/expect -f
2#
3# mac-vlan
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#
11# N
12#
13send -- "firejail --noprofile --net=eth0\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 1
19
20send -- "dig google.com\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "ANSWER SECTION"
24}
25expect {
26 timeout {puts "TESTING ERROR 1.1\n";exit}
27 "google.com"
28}
29expect {
30 timeout {puts "TESTING ERROR 1.2\n";exit}
31 "google.com"
32}
33expect {
34 timeout {puts "TESTING ERROR 1.3\n";exit}
35 "SERVER:"
36}
37after 100
38
39send -- "/sbin/ifconfig\r"
40expect {
41 timeout {puts "TESTING ERROR 1.4\n";exit}
42 "eth0"
43}
44expect {
45 timeout {puts "TESTING ERROR 1.5n";exit}
46 "Link"
47}
48expect {
49 timeout {puts "TESTING ERROR 1.6\n";exit}
50 "192.168.1"
51}
52expect {
53 timeout {puts "TESTING ERROR 1.7\n";exit}
54 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
55}
56after 100
57
58send -- "exit\r"
59sleep 1
60
61send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244\r"
62expect {
63 timeout {puts "TESTING ERROR 0\n";exit}
64 "Child process initialized"
65}
66sleep 1
67
68send -- "dig google.com\r"
69expect {
70 timeout {puts "TESTING ERROR 1\n";exit}
71 "ANSWER SECTION"
72}
73expect {
74 timeout {puts "TESTING ERROR 1.1\n";exit}
75 "google.com"
76}
77expect {
78 timeout {puts "TESTING ERROR 1.2\n";exit}
79 "google.com"
80}
81expect {
82 timeout {puts "TESTING ERROR 1.3\n";exit}
83 "SERVER:"
84}
85after 100
86
87send -- "/sbin/ifconfig\r"
88expect {
89 timeout {puts "TESTING ERROR 1.4\n";exit}
90 "eth0"
91}
92expect {
93 timeout {puts "TESTING ERROR 1.5n";exit}
94 "Link"
95}
96expect {
97 timeout {puts "TESTING ERROR 1.6\n";exit}
98 "192.168.1.244"
99}
100expect {
101 timeout {puts "TESTING ERROR 1.7\n";exit}
102 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
103}
104after 100
105
106send -- "exit\r"
107sleep 1
108
109#
110# O
111#
112send -- "firejail --noprofile --net=eth0 --overlay\r"
113expect {
114 timeout {puts "TESTING ERROR 2\n";exit}
115 "Child process initialized"
116}
117sleep 1
118
119send -- "dig google.com\r"
120expect {
121 timeout {puts "TESTING ERROR 3\n";exit}
122 "ANSWER SECTION"
123}
124expect {
125 timeout {puts "TESTING ERROR 3.1\n";exit}
126 "google.com"
127}
128expect {
129 timeout {puts "TESTING ERROR 3.2\n";exit}
130 "google.com"
131}
132expect {
133 timeout {puts "TESTING ERROR 3.3\n";exit}
134 "SERVER"
135}
136after 100
137
138send -- "/sbin/ifconfig\r"
139expect {
140 timeout {puts "TESTING ERROR 3.4\n";exit}
141 "eth0"
142}
143expect {
144 timeout {puts "TESTING ERROR 3.5\n";exit}
145 "Link"
146}
147expect {
148 timeout {puts "TESTING ERROR 3.6\n";exit}
149 "192.168.1"
150}
151expect {
152 timeout {puts "TESTING ERROR 3.7\n";exit}
153 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
154}
155after 100
156
157send -- "exit\r"
158sleep 1
159
160send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay\r"
161expect {
162 timeout {puts "TESTING ERROR 2\n";exit}
163 "Child process initialized"
164}
165sleep 1
166
167send -- "dig google.com\r"
168expect {
169 timeout {puts "TESTING ERROR 3\n";exit}
170 "ANSWER SECTION"
171}
172expect {
173 timeout {puts "TESTING ERROR 3.1\n";exit}
174 "google.com"
175}
176expect {
177 timeout {puts "TESTING ERROR 3.2\n";exit}
178 "google.com"
179}
180expect {
181 timeout {puts "TESTING ERROR 3.3\n";exit}
182 "SERVER"
183}
184after 100
185
186send -- "/sbin/ifconfig\r"
187expect {
188 timeout {puts "TESTING ERROR 3.4\n";exit}
189 "eth0"
190}
191expect {
192 timeout {puts "TESTING ERROR 3.5\n";exit}
193 "Link"
194}
195expect {
196 timeout {puts "TESTING ERROR 3.6\n";exit}
197 "192.168.1.244"
198}
199expect {
200 timeout {puts "TESTING ERROR 3.7\n";exit}
201 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
202}
203after 100
204
205send -- "exit\r"
206sleep 1
207
208
209#
210# C
211#
212send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot\r"
213expect {
214 timeout {puts "TESTING ERROR 4\n";exit}
215 "Child process initialized"
216}
217sleep 1
218
219send -- "dig google.com\r"
220expect {
221 timeout {puts "TESTING ERROR 5\n";exit}
222 "ANSWER SECTION"
223}
224expect {
225 timeout {puts "TESTING ERROR 5.1\n";exit}
226 "google.com"
227}
228expect {
229 timeout {puts "TESTING ERROR 5.2\n";exit}
230 "google.com"
231}
232expect {
233 timeout {puts "TESTING ERROR 5.3\n";exit}
234 "SERVER:"
235}
236after 100
237
238send -- "/sbin/ifconfig\r"
239expect {
240 timeout {puts "TESTING ERROR 5.4\n";exit}
241 "eth0"
242}
243expect {
244 timeout {puts "TESTING ERROR 5.5\n";exit}
245 "Link"
246}
247expect {
248 timeout {puts "TESTING ERROR 5.6\n";exit}
249 "192.168.1"
250}
251expect {
252 timeout {puts "TESTING ERROR 5.7\n";exit}
253 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
254}
255after 100
256
257send -- "exit\r"
258sleep 1
259
260send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot\r"
261expect {
262 timeout {puts "TESTING ERROR 4\n";exit}
263 "Child process initialized"
264}
265sleep 1
266
267send -- "dig google.com\r"
268expect {
269 timeout {puts "TESTING ERROR 5\n";exit}
270 "ANSWER SECTION"
271}
272expect {
273 timeout {puts "TESTING ERROR 5.1\n";exit}
274 "google.com"
275}
276expect {
277 timeout {puts "TESTING ERROR 5.2\n";exit}
278 "google.com"
279}
280expect {
281 timeout {puts "TESTING ERROR 5.3\n";exit}
282 "SERVER:"
283}
284after 100
285
286send -- "/sbin/ifconfig\r"
287expect {
288 timeout {puts "TESTING ERROR 5.4\n";exit}
289 "eth0"
290}
291expect {
292 timeout {puts "TESTING ERROR 5.5\n";exit}
293 "Link"
294}
295expect {
296 timeout {puts "TESTING ERROR 5.6\n";exit}
297 "192.168.1.244"
298}
299expect {
300 timeout {puts "TESTING ERROR 5.7\n";exit}
301 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
302}
303after 100
304
305send -- "exit\r"
306sleep 1
307
308
309puts "\nall done\n"