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