diff options
author | 2016-05-03 08:41:24 -0400 | |
---|---|---|
committer | 2016-05-03 08:41:24 -0400 | |
commit | 57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc (patch) | |
tree | 60f90718665a1a812b552f589bc4d85616232df1 /test/net_interface.exp | |
parent | Merge branch 'master' of https://github.com/netblue30/firejail (diff) | |
download | firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.gz firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.zst firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.zip |
networking features testing
Diffstat (limited to 'test/net_interface.exp')
-rwxr-xr-x | test/net_interface.exp | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/test/net_interface.exp b/test/net_interface.exp deleted file mode 100755 index 4b55187ff..000000000 --- a/test/net_interface.exp +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "ip link add link eth0 name eth0.100 type vlan id 100\r" | ||
8 | sleep 1 | ||
9 | send -- "ip link add link eth0 name eth0.101 type vlan id 101\r" | ||
10 | sleep 1 | ||
11 | send -- "ip link add link eth0 name eth0.102 type vlan id 102\r" | ||
12 | sleep 1 | ||
13 | send -- "ip link add link eth0 name eth0.103 type vlan id 103\r" | ||
14 | sleep 1 | ||
15 | send -- "ip link add link eth0 name eth0.104 type vlan id 104\r" | ||
16 | sleep 1 | ||
17 | puts "\n" | ||
18 | |||
19 | send -- "/sbin/ifconfig eth0.100 10.200.0.1/24\r" | ||
20 | sleep 1 | ||
21 | send -- "/sbin/ifconfig eth0.101 10.200.1.1/24\r" | ||
22 | sleep 1 | ||
23 | send -- "/sbin/ifconfig eth0.102 10.200.2.1/24\r" | ||
24 | sleep 1 | ||
25 | send -- "/sbin/ifconfig eth0.103 10.200.3.1/24\r" | ||
26 | sleep 1 | ||
27 | send -- "/sbin/ifconfig eth0.104 10.200.4.1/24\r" | ||
28 | sleep 1 | ||
29 | puts "\n" | ||
30 | |||
31 | |||
32 | |||
33 | send -- "firejail --noprofile --interface=eth0.100 --interface=eth0.101 --interface=eth0.102 --interface=eth0.103 --interface=eth0.104\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 0\n";exit} | ||
36 | "maximum 4 interfaces are allowed" | ||
37 | } | ||
38 | sleep 1 | ||
39 | |||
40 | send -- "firejail --noprofile --interface=eth0.100 --interface=eth0.101 --interface=eth0.102 --interface=eth0.103\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 1\n";exit} | ||
43 | "eth0.100" | ||
44 | } | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
47 | "UP" | ||
48 | } | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 2\n";exit} | ||
51 | "eth0.101" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
55 | "UP" | ||
56 | } | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 3\n";exit} | ||
59 | "eth0.102" | ||
60 | } | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
63 | "UP" | ||
64 | } | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 4\n";exit} | ||
67 | "eth0.103" | ||
68 | } | ||
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
71 | "UP" | ||
72 | } | ||
73 | sleep 1 | ||
74 | send -- "exit\r" | ||
75 | sleep 1 | ||
76 | |||
77 | send -- "firejail --noprofile --interface=eth0.104\r" | ||
78 | expect { | ||
79 | timeout {puts "TESTING ERROR 5\n";exit} | ||
80 | "eth0.104" | ||
81 | } | ||
82 | expect { | ||
83 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
84 | "UP" | ||
85 | } | ||
86 | |||
87 | puts "all done\n" | ||
88 | |||