diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/network/configure | 24 | ||||
-rwxr-xr-x | test/network/network.sh | 62 | ||||
-rwxr-xr-x | test/test.sh | 49 |
3 files changed, 86 insertions, 49 deletions
diff --git a/test/network/configure b/test/network/configure new file mode 100755 index 000000000..788c5a9a0 --- /dev/null +++ b/test/network/configure | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | brctl addbr br0 | ||
4 | ifconfig br0 10.10.20.1/29 up | ||
5 | # NAT masquerade | ||
6 | iptables -t nat -A POSTROUTING -o eth0 -s 10.10.20.0/29 -j MASQUERADE | ||
7 | # port forwarding | ||
8 | # iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.10.20.2:80 | ||
9 | |||
10 | brctl addbr br1 | ||
11 | ifconfig br1 10.10.30.1/24 up | ||
12 | brctl addbr br2 | ||
13 | ifconfig br2 10.10.40.1/24 up | ||
14 | brctl addbr br3 | ||
15 | ifconfig br3 10.10.50.1/24 up | ||
16 | brctl addbr br4 | ||
17 | ifconfig br4 10.10.60.1/24 up | ||
18 | ip link add link eth0 name eth0.5 type vlan id 5 | ||
19 | /sbin/ifconfig eth0.5 10.10.205.10/24 up | ||
20 | ip link add link eth0 name eth0.6 type vlan id 6 | ||
21 | /sbin/ifconfig eth0.6 10.10.206.10/24 up | ||
22 | ip link add link eth0 name eth0.7 type vlan id 7 | ||
23 | /sbin/ifconfig eth0.7 10.10.207.10/24 up | ||
24 | |||
diff --git a/test/network/network.sh b/test/network/network.sh new file mode 100755 index 000000000..7b6d66e34 --- /dev/null +++ b/test/network/network.sh | |||
@@ -0,0 +1,62 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | echo "TESTING: network profile (net_profile.exp)" | ||
10 | ./net_profile.exp | ||
11 | |||
12 | echo "TESTING: bandwidth (bandwidth.exp)" | ||
13 | ./bandwidth.exp | ||
14 | |||
15 | echo "TESTING: IPv6 support (ip6.exp)" | ||
16 | ./ip6.exp | ||
17 | |||
18 | echo "TESTING: local network (net_local.exp)" | ||
19 | ./net_local.exp | ||
20 | |||
21 | echo "TESTING: no network (net_none.exp)" | ||
22 | ./net_none.exp | ||
23 | |||
24 | echo "TESTING: network IP (net_ip.exp)" | ||
25 | ./net_ip.exp | ||
26 | |||
27 | echo "TESTING: network MAC (net_mac.exp)" | ||
28 | sleep 2 | ||
29 | ./net_mac.exp | ||
30 | |||
31 | echo "TESTING: network MTU (net_mtu.exp)" | ||
32 | ./net_mtu.exp | ||
33 | |||
34 | echo "TESTING: network hostname (hostname.exp)" | ||
35 | ./hostname.exp | ||
36 | |||
37 | echo "TESTING: network bad IP (net_badip.exp)" | ||
38 | ./net_badip.exp | ||
39 | |||
40 | echo "TESTING: network no IP test 1 (net_noip.exp)" | ||
41 | ./net_noip.exp | ||
42 | |||
43 | echo "TESTING: network no IP test 2 (net_noip2.exp)" | ||
44 | ./net_noip2.exp | ||
45 | |||
46 | echo "TESTING: network default gateway test 1 (net_defaultgw.exp)" | ||
47 | ./net_defaultgw.exp | ||
48 | |||
49 | echo "TESTING: network default gateway test 2 (net_defaultgw2.exp)" | ||
50 | ./net_defaultgw2.exp | ||
51 | |||
52 | echo "TESTING: network default gateway test 3 (net_defaultgw3.exp)" | ||
53 | ./net_defaultgw3.exp | ||
54 | |||
55 | echo "TESTING: netfilter (net_netfilter.exp)" | ||
56 | ./net_netfilter.exp | ||
57 | |||
58 | echo "TESTING: 4 bridges ARP (4bridges_arp.exp)" | ||
59 | ./4bridges_arp.exp | ||
60 | |||
61 | echo "TESTING: 4 bridges IP (4bridges_ip.exp)" | ||
62 | ./4bridges_ip.exp | ||
diff --git a/test/test.sh b/test/test.sh index 9d7dba4fa..78a6adc43 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -179,55 +179,6 @@ echo "TESTING: read/write /dev/shm (fs_dev_shm.exp)" | |||
179 | echo "TESTING: quiet (quiet.exp)" | 179 | echo "TESTING: quiet (quiet.exp)" |
180 | ./quiet.exp | 180 | ./quiet.exp |
181 | 181 | ||
182 | echo "TESTING: IPv6 support (ip6.exp)" | ||
183 | echo "TESTING: broken on Centos - todo" | ||
184 | ./ip6.exp | ||
185 | |||
186 | echo "TESTING: local network (net_local.exp)" | ||
187 | ./net_local.exp | ||
188 | |||
189 | echo "TESTING: no network (net_none.exp)" | ||
190 | ./net_none.exp | ||
191 | |||
192 | echo "TESTING: network IP (net_ip.exp)" | ||
193 | ./net_ip.exp | ||
194 | |||
195 | echo "TESTING: network MAC (net_mac.exp)" | ||
196 | sleep 2 | ||
197 | ./net_mac.exp | ||
198 | |||
199 | echo "TESTING: network MTU (net_mtu.exp)" | ||
200 | ./net_mtu.exp | ||
201 | |||
202 | echo "TESTING: network hostname (hostname.exp)" | ||
203 | ./hostname.exp | ||
204 | |||
205 | echo "TESTING: network bad IP (net_badip.exp)" | ||
206 | ./net_badip.exp | ||
207 | |||
208 | echo "TESTING: network no IP test 1 (net_noip.exp)" | ||
209 | ./net_noip.exp | ||
210 | |||
211 | echo "TESTING: network no IP test 2 (net_noip2.exp)" | ||
212 | ./net_noip2.exp | ||
213 | |||
214 | echo "TESTING: network default gateway test 1 (net_defaultgw.exp)" | ||
215 | ./net_defaultgw.exp | ||
216 | |||
217 | echo "TESTING: network default gateway test 2 (net_defaultgw2.exp)" | ||
218 | ./net_defaultgw2.exp | ||
219 | |||
220 | echo "TESTING: network default gateway test 3 (net_defaultgw3.exp)" | ||
221 | ./net_defaultgw3.exp | ||
222 | |||
223 | echo "TESTING: netfilter (net_netfilter.exp)" | ||
224 | ./net_netfilter.exp | ||
225 | |||
226 | echo "TESTING: 4 bridges ARP (4bridges_arp.exp)" | ||
227 | ./4bridges_arp.exp | ||
228 | |||
229 | echo "TESTING: 4 bridges IP (4bridges_ip.exp)" | ||
230 | ./4bridges_ip.exp | ||
231 | 182 | ||
232 | echo "TESTING: login SSH (login_ssh.exp)" | 183 | echo "TESTING: login SSH (login_ssh.exp)" |
233 | ./login_ssh.exp | 184 | ./login_ssh.exp |