diff options
author | 2023-03-02 10:34:03 -0500 | |
---|---|---|
committer | 2023-03-02 10:34:03 -0500 | |
commit | 336ecb5d651f22e5a3722ead843181a86dcc066d (patch) | |
tree | e733078e8b3ae1c6d0d7e236911c0f12ae556baa /test/network/4bridges_arp.exp | |
parent | gajim: allow loading plugins (#5705) (diff) | |
download | firejail-336ecb5d651f22e5a3722ead843181a86dcc066d.tar.gz firejail-336ecb5d651f22e5a3722ead843181a86dcc066d.tar.zst firejail-336ecb5d651f22e5a3722ead843181a86dcc066d.zip |
network testing; merges
Diffstat (limited to 'test/network/4bridges_arp.exp')
-rwxr-xr-x | test/network/4bridges_arp.exp | 177 |
1 files changed, 0 insertions, 177 deletions
diff --git a/test/network/4bridges_arp.exp b/test/network/4bridges_arp.exp deleted file mode 100755 index ca326320a..000000000 --- a/test/network/4bridges_arp.exp +++ /dev/null | |||
@@ -1,177 +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 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # check eth0 | ||
11 | send -- "firejail --net=br0 --net=br1 --net=br2 --net=br3\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0.0\n";exit} | ||
14 | "eth0" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
18 | "10.10.20" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 0.2\n";exit} | ||
22 | "255.255.255.248" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 0.3\n";exit} | ||
26 | "UP" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 0.4\n";exit} | ||
30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
31 | } | ||
32 | sleep 1 | ||
33 | send -- "exit\r" | ||
34 | sleep 1 | ||
35 | |||
36 | # check eth1 | ||
37 | send -- "firejail --net=br0 --net=br1 --net=br2 --net=br3\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 1.0\n";exit} | ||
40 | "eth1" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
44 | "10.10.30" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
48 | "255.255.255.0" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
52 | "UP" | ||
53 | } | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
57 | } | ||
58 | sleep 1 | ||
59 | send -- "exit\r" | ||
60 | sleep 1 | ||
61 | |||
62 | |||
63 | # check eth2 | ||
64 | send -- "firejail --net=br0 --net=br1 --net=br2 --net=br3\r" | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 2.0\n";exit} | ||
67 | "eth2" | ||
68 | } | ||
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
71 | "10.10.40" | ||
72 | } | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
75 | "255.255.255.0" | ||
76 | } | ||
77 | expect { | ||
78 | timeout {puts "TESTING ERROR 2.3\n";exit} | ||
79 | "UP" | ||
80 | } | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 2.4\n";exit} | ||
83 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
84 | } | ||
85 | sleep 1 | ||
86 | send -- "exit\r" | ||
87 | sleep 1 | ||
88 | |||
89 | |||
90 | |||
91 | # check eth3 | ||
92 | send -- "firejail --net=br0 --net=br1 --net=br2 --net=br3\r" | ||
93 | expect { | ||
94 | timeout {puts "TESTING ERROR 3.0\n";exit} | ||
95 | "eth3" | ||
96 | } | ||
97 | expect { | ||
98 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
99 | "10.10.50" | ||
100 | } | ||
101 | expect { | ||
102 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
103 | "255.255.255.0" | ||
104 | } | ||
105 | expect { | ||
106 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
107 | "UP" | ||
108 | } | ||
109 | expect { | ||
110 | timeout {puts "TESTING ERROR 4\n";exit} | ||
111 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
112 | } | ||
113 | sleep 1 | ||
114 | send -- "exit\r" | ||
115 | sleep 1 | ||
116 | |||
117 | |||
118 | |||
119 | |||
120 | # check loopback | ||
121 | send -- "firejail --net=br0 --net=br1 --net=br2 --net=br3 --protocol=unix,inet,netlink\r" | ||
122 | expect { | ||
123 | timeout {puts "TESTING ERROR 5\n";exit} | ||
124 | "lo" | ||
125 | } | ||
126 | expect { | ||
127 | timeout {puts "TESTING ERROR 6\n";exit} | ||
128 | "127.0.0.1" | ||
129 | } | ||
130 | expect { | ||
131 | timeout {puts "TESTING ERROR 7\n";exit} | ||
132 | "255.0.0.0" | ||
133 | } | ||
134 | expect { | ||
135 | timeout {puts "TESTING ERROR 8\n";exit} | ||
136 | "UP" | ||
137 | } | ||
138 | expect { | ||
139 | timeout {puts "TESTING ERROR 9\n";exit} | ||
140 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
141 | } | ||
142 | sleep 1 | ||
143 | |||
144 | # check default gateway | ||
145 | send -- "ip route show\r" | ||
146 | expect { | ||
147 | timeout {puts "TESTING ERROR 10.1\n";exit} | ||
148 | "default via 10.10.20.1 dev eth0" | ||
149 | } | ||
150 | send -- "ip route show\r" | ||
151 | expect { | ||
152 | timeout {puts "TESTING ERROR 10.2\n";exit} | ||
153 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} | ||
154 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
155 | } | ||
156 | send -- "ip route show\r" | ||
157 | expect { | ||
158 | timeout {puts "TESTING ERROR 10.2\n";exit} | ||
159 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "old iproute2\n";} | ||
160 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "new iproute2\n";} | ||
161 | } | ||
162 | send -- "ip route show\r" | ||
163 | expect { | ||
164 | timeout {puts "TESTING ERROR 10.2\n";exit} | ||
165 | "10.10.40.0/24 dev eth2 proto kernel scope link" {puts "old iproute2\n";} | ||
166 | "10.10.40.0/24 dev eth2 proto kernel scope link" {puts "new iproute2\n";} | ||
167 | } | ||
168 | send -- "ip route show\r" | ||
169 | expect { | ||
170 | timeout {puts "TESTING ERROR 10.2\n";exit} | ||
171 | "10.10.50.0/24 dev eth3 proto kernel scope link" {puts "old iproute2\n";} | ||
172 | "10.10.50.0/24 dev eth3 proto kernel scope link" {puts "new iproute2\n";} | ||
173 | } | ||
174 | send -- "exit\r" | ||
175 | after 100 | ||
176 | |||
177 | puts "\nall done\n" | ||