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