aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.4.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.4.exp
parentfeature testing (diff)
downloadfirejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.tar.gz
firejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.tar.zst
firejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.zip
feature testing
Diffstat (limited to 'test/features/2.4.exp')
-rwxr-xr-xtest/features/2.4.exp232
1 files changed, 232 insertions, 0 deletions
diff --git a/test/features/2.4.exp b/test/features/2.4.exp
new file mode 100755
index 000000000..a995322b9
--- /dev/null
+++ b/test/features/2.4.exp
@@ -0,0 +1,232 @@
1#!/usr/bin/expect -f
2#
3# bridge
4# - todo: ping test or equivalent on chroot
5#
6
7set timeout 10
8spawn $env(SHELL)
9match_max 100000
10
11#
12# N
13#
14send -- "firejail --noprofile --net=br0\r"
15expect {
16 timeout {puts "TESTING ERROR 0\n";exit}
17 "Child process initialized"
18}
19sleep 1
20
21send -- "ping -c 3 10.10.20.1\r"
22expect {
23 timeout {puts "TESTING ERROR 1\n";exit}
24 " packets transmitted, 3 received, 0% packet loss"
25}
26sleep 1
27
28
29send -- "/sbin/ifconfig\r"
30expect {
31 timeout {puts "TESTING ERROR 1.4\n";exit}
32 "eth0"
33}
34expect {
35 timeout {puts "TESTING ERROR 1.5n";exit}
36 "Link"
37}
38expect {
39 timeout {puts "TESTING ERROR 1.6\n";exit}
40 "10.10.20"
41}
42expect {
43 timeout {puts "TESTING ERROR 1.7\n";exit}
44 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
45}
46after 100
47
48send -- "exit\r"
49sleep 1
50
51send -- "firejail --noprofile --net=br0 --ip=10.10.20.4\r"
52expect {
53 timeout {puts "TESTING ERROR 0\n";exit}
54 "Child process initialized"
55}
56sleep 1
57
58send -- "ping -c 3 10.10.20.1\r"
59expect {
60 timeout {puts "TESTING ERROR 1\n";exit}
61 " packets transmitted, 3 received, 0% packet loss"
62}
63sleep 1
64
65
66send -- "/sbin/ifconfig\r"
67expect {
68 timeout {puts "TESTING ERROR 1.4\n";exit}
69 "eth0"
70}
71expect {
72 timeout {puts "TESTING ERROR 1.5n";exit}
73 "Link"
74}
75expect {
76 timeout {puts "TESTING ERROR 1.6\n";exit}
77 "10.10.20.4"
78}
79expect {
80 timeout {puts "TESTING ERROR 1.7\n";exit}
81 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
82}
83after 100
84
85send -- "exit\r"
86sleep 1
87
88
89#
90# O
91#
92send -- "firejail --noprofile --net=br0 --overlay\r"
93expect {
94 timeout {puts "TESTING ERROR 2\n";exit}
95 "Child process initialized"
96}
97sleep 1
98
99send -- "ping -c 3 10.10.20.1\r"
100expect {
101 timeout {puts "TESTING ERROR 3\n";exit}
102 " packets transmitted, 3 received, 0% packet loss"
103}
104sleep 1
105
106
107send -- "/sbin/ifconfig\r"
108expect {
109 timeout {puts "TESTING ERROR 3.4\n";exit}
110 "eth0"
111}
112expect {
113 timeout {puts "TESTING ERROR 3.5\n";exit}
114 "Link"
115}
116expect {
117 timeout {puts "TESTING ERROR 3.6\n";exit}
118 "10.10.20"
119}
120expect {
121 timeout {puts "TESTING ERROR 3.7\n";exit}
122 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
123}
124after 100
125
126send -- "exit\r"
127sleep 1
128
129send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r"
130expect {
131 timeout {puts "TESTING ERROR 2\n";exit}
132 "Child process initialized"
133}
134sleep 1
135
136send -- "ping -c 3 10.10.20.1\r"
137expect {
138 timeout {puts "TESTING ERROR 3\n";exit}
139 " packets transmitted, 3 received, 0% packet loss"
140}
141sleep 1
142
143
144send -- "/sbin/ifconfig\r"
145expect {
146 timeout {puts "TESTING ERROR 3.4\n";exit}
147 "eth0"
148}
149expect {
150 timeout {puts "TESTING ERROR 3.5\n";exit}
151 "Link"
152}
153expect {
154 timeout {puts "TESTING ERROR 3.6\n";exit}
155 "10.10.20.4"
156}
157expect {
158 timeout {puts "TESTING ERROR 3.7\n";exit}
159 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
160}
161after 100
162
163send -- "exit\r"
164sleep 1
165
166
167
168#
169# C
170#
171send -- "firejail --noprofile --net=br0 --chroot=/tmp/chroot\r"
172expect {
173 timeout {puts "TESTING ERROR 4\n";exit}
174 "Child process initialized"
175}
176sleep 1
177
178send -- "/sbin/ifconfig\r"
179expect {
180 timeout {puts "TESTING ERROR 5.4\n";exit}
181 "eth0"
182}
183expect {
184 timeout {puts "TESTING ERROR 5.5\n";exit}
185 "Link"
186}
187expect {
188 timeout {puts "TESTING ERROR 5.6\n";exit}
189 "10.10.20"
190}
191expect {
192 timeout {puts "TESTING ERROR 5.7\n";exit}
193 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
194}
195after 100
196
197send -- "exit\r"
198sleep 1
199
200send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --chroot=/tmp/chroot\r"
201expect {
202 timeout {puts "TESTING ERROR 4\n";exit}
203 "Child process initialized"
204}
205sleep 1
206
207send -- "/sbin/ifconfig\r"
208expect {
209 timeout {puts "TESTING ERROR 5.4\n";exit}
210 "eth0"
211}
212expect {
213 timeout {puts "TESTING ERROR 5.5\n";exit}
214 "Link"
215}
216expect {
217 timeout {puts "TESTING ERROR 5.6\n";exit}
218 "10.10.20.4"
219}
220expect {
221 timeout {puts "TESTING ERROR 5.7\n";exit}
222 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
223}
224after 100
225
226send -- "exit\r"
227sleep 1
228
229
230
231
232puts "\nall done\n"