aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/4bridges_arp.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/4bridges_arp.exp')
-rwxr-xr-xtest/network/4bridges_arp.exp177
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10# check eth0
11send -- "firejail --net=br0 --net=br1 --net=br2 --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 --net=br2 --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"
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 --net=br2 --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"
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 --net=br2 --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 --net=br2 --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}
142sleep 1
143
144# check default gateway
145send -- "ip route show\r"
146expect {
147 timeout {puts "TESTING ERROR 10.1\n";exit}
148 "default via 10.10.20.1 dev eth0"
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}
156send -- "ip route show\r"
157expect {
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}
162send -- "ip route show\r"
163expect {
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}
168send -- "ip route show\r"
169expect {
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}
174send -- "exit\r"
175after 100
176
177puts "\nall done\n"