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