diff options
Diffstat (limited to 'test/root/net_interface.exp')
-rwxr-xr-x | test/root/net_interface.exp | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/test/root/net_interface.exp b/test/root/net_interface.exp deleted file mode 100755 index 2f87024d8..000000000 --- a/test/root/net_interface.exp +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "ip link add link eth0 name eth0.100 type vlan id 100\r" | ||
11 | sleep 1 | ||
12 | send -- "ip link add link eth0 name eth0.101 type vlan id 101\r" | ||
13 | sleep 1 | ||
14 | send -- "ip link add link eth0 name eth0.102 type vlan id 102\r" | ||
15 | sleep 1 | ||
16 | send -- "ip link add link eth0 name eth0.103 type vlan id 103\r" | ||
17 | sleep 1 | ||
18 | send -- "ip link add link eth0 name eth0.104 type vlan id 104\r" | ||
19 | sleep 1 | ||
20 | puts "\n" | ||
21 | |||
22 | send -- "/sbin/ifconfig eth0.100 10.200.0.1/24\r" | ||
23 | sleep 1 | ||
24 | send -- "/sbin/ifconfig eth0.101 10.200.1.1/24\r" | ||
25 | sleep 1 | ||
26 | send -- "/sbin/ifconfig eth0.102 10.200.2.1/24\r" | ||
27 | sleep 1 | ||
28 | send -- "/sbin/ifconfig eth0.103 10.200.3.1/24\r" | ||
29 | sleep 1 | ||
30 | send -- "/sbin/ifconfig eth0.104 10.200.4.1/24\r" | ||
31 | sleep 1 | ||
32 | puts "\n" | ||
33 | |||
34 | |||
35 | |||
36 | send -- "firejail --noprofile --interface=eth0.100 --interface=eth0.101 --interface=eth0.102 --interface=eth0.103 --interface=eth0.104\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 0\n";exit} | ||
39 | "maximum 4 interfaces are allowed" | ||
40 | } | ||
41 | sleep 1 | ||
42 | |||
43 | send -- "firejail --noprofile --interface=eth0.100 --interface=eth0.101 --interface=eth0.102 --interface=eth0.103\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 1\n";exit} | ||
46 | "eth0.100" | ||
47 | } | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
50 | "UP" | ||
51 | } | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 2\n";exit} | ||
54 | "eth0.101" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
58 | "UP" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 3\n";exit} | ||
62 | "eth0.102" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
66 | "UP" | ||
67 | } | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 4\n";exit} | ||
70 | "eth0.103" | ||
71 | } | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
74 | "UP" | ||
75 | } | ||
76 | sleep 1 | ||
77 | send -- "exit\r" | ||
78 | sleep 1 | ||
79 | |||
80 | send -- "firejail --noprofile --interface=eth0.104\r" | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 5\n";exit} | ||
83 | "eth0.104" | ||
84 | } | ||
85 | expect { | ||
86 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
87 | "UP" | ||
88 | } | ||
89 | send -- "exit\r" | ||
90 | after 100 | ||
91 | |||
92 | puts "all done\n" | ||
93 | |||