diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2017-04-17 00:06:53 +0200 |
---|---|---|
committer | Reiner Herrmann <reiner@reiner-h.de> | 2017-04-17 00:06:53 +0200 |
commit | 575aca9482de3a1d81dbf45fa7734de229858558 (patch) | |
tree | f0b2fdeaee1b41f50ae0f74c3f1527bf7914e8c5 | |
parent | test: rm has no output by default (diff) | |
download | firejail-575aca9482de3a1d81dbf45fa7734de229858558.tar.gz firejail-575aca9482de3a1d81dbf45fa7734de229858558.tar.zst firejail-575aca9482de3a1d81dbf45fa7734de229858558.zip |
test: adapt output to newer versions of iproute2 and net-tools
iproute2 now prevents output of double spaces
-rwxr-xr-x | test/network/4bridges_arp.exp | 12 | ||||
-rwxr-xr-x | test/network/4bridges_ip.exp | 12 | ||||
-rwxr-xr-x | test/network/interface.exp | 8 | ||||
-rwxr-xr-x | test/network/net_defaultgw.exp | 3 | ||||
-rwxr-xr-x | test/network/net_defaultgw2.exp | 6 | ||||
-rwxr-xr-x | test/network/net_ip.exp | 3 | ||||
-rwxr-xr-x | test/network/net_profile.exp | 6 |
7 files changed, 33 insertions, 17 deletions
diff --git a/test/network/4bridges_arp.exp b/test/network/4bridges_arp.exp index 80760eb3a..e84ec719c 100755 --- a/test/network/4bridges_arp.exp +++ b/test/network/4bridges_arp.exp | |||
@@ -150,22 +150,26 @@ expect { | |||
150 | send -- "ip route show\r" | 150 | send -- "ip route show\r" |
151 | expect { | 151 | expect { |
152 | timeout {puts "TESTING ERROR 10.2\n";exit} | 152 | timeout {puts "TESTING ERROR 10.2\n";exit} |
153 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 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";} | ||
154 | } | 155 | } |
155 | send -- "ip route show\r" | 156 | send -- "ip route show\r" |
156 | expect { | 157 | expect { |
157 | timeout {puts "TESTING ERROR 10.2\n";exit} | 158 | timeout {puts "TESTING ERROR 10.2\n";exit} |
158 | "10.10.30.0/24 dev eth1 proto kernel scope link" | 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";} | ||
159 | } | 161 | } |
160 | send -- "ip route show\r" | 162 | send -- "ip route show\r" |
161 | expect { | 163 | expect { |
162 | timeout {puts "TESTING ERROR 10.2\n";exit} | 164 | timeout {puts "TESTING ERROR 10.2\n";exit} |
163 | "10.10.40.0/24 dev eth2 proto kernel scope link" | 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";} | ||
164 | } | 167 | } |
165 | send -- "ip route show\r" | 168 | send -- "ip route show\r" |
166 | expect { | 169 | expect { |
167 | timeout {puts "TESTING ERROR 10.2\n";exit} | 170 | timeout {puts "TESTING ERROR 10.2\n";exit} |
168 | "10.10.50.0/24 dev eth3 proto kernel scope link" | 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";} | ||
169 | } | 173 | } |
170 | send -- "exit\r" | 174 | send -- "exit\r" |
171 | after 100 | 175 | after 100 |
diff --git a/test/network/4bridges_ip.exp b/test/network/4bridges_ip.exp index 5e136926b..74a1e5d68 100755 --- a/test/network/4bridges_ip.exp +++ b/test/network/4bridges_ip.exp | |||
@@ -150,25 +150,29 @@ expect { | |||
150 | send -- "ip route show\r" | 150 | send -- "ip route show\r" |
151 | expect { | 151 | expect { |
152 | timeout {puts "TESTING ERROR 10.2\n";exit} | 152 | timeout {puts "TESTING ERROR 10.2\n";exit} |
153 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 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";} | ||
154 | } | 155 | } |
155 | 156 | ||
156 | send -- "ip route show\r" | 157 | send -- "ip route show\r" |
157 | expect { | 158 | expect { |
158 | timeout {puts "TESTING ERROR 10.3\n";exit} | 159 | timeout {puts "TESTING ERROR 10.3\n";exit} |
159 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" | 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";} | ||
160 | } | 162 | } |
161 | 163 | ||
162 | send -- "ip route show\r" | 164 | send -- "ip route show\r" |
163 | expect { | 165 | expect { |
164 | timeout {puts "TESTING ERROR 10.4\n";exit} | 166 | timeout {puts "TESTING ERROR 10.4\n";exit} |
165 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" | 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";} | ||
166 | } | 169 | } |
167 | 170 | ||
168 | send -- "ip route show\r" | 171 | send -- "ip route show\r" |
169 | expect { | 172 | expect { |
170 | timeout {puts "TESTING ERROR 10.5\n";exit} | 173 | timeout {puts "TESTING ERROR 10.5\n";exit} |
171 | "10.10.50.0/24 dev eth3 proto kernel scope link" | 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";} | ||
172 | } | 176 | } |
173 | 177 | ||
174 | send -- "exit\r" | 178 | send -- "exit\r" |
diff --git a/test/network/interface.exp b/test/network/interface.exp index bd8777c33..638e6d32b 100755 --- a/test/network/interface.exp +++ b/test/network/interface.exp | |||
@@ -27,8 +27,9 @@ expect { | |||
27 | "eth0.5" | 27 | "eth0.5" |
28 | } | 28 | } |
29 | expect { | 29 | expect { |
30 | timeout {puts "TESTING ERROR 2n";exit} | 30 | timeout {puts "TESTING ERROR 2\n";exit} |
31 | "Link" | 31 | "Link" {puts "old net-tools\n";} |
32 | "flags" {puts "new net-tools\n";} | ||
32 | } | 33 | } |
33 | expect { | 34 | expect { |
34 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 3\n";exit} |
@@ -47,7 +48,8 @@ expect { | |||
47 | } | 48 | } |
48 | expect { | 49 | expect { |
49 | timeout {puts "TESTING ERROR 6\n";exit} | 50 | timeout {puts "TESTING ERROR 6\n";exit} |
50 | "Link" | 51 | "Link" {puts "old net-tools\n";} |
52 | "flags" {puts "new net-tools\n";} | ||
51 | } | 53 | } |
52 | expect { | 54 | expect { |
53 | timeout {puts "TESTING ERROR 7\n";exit} | 55 | timeout {puts "TESTING ERROR 7\n";exit} |
diff --git a/test/network/net_defaultgw.exp b/test/network/net_defaultgw.exp index c7178616a..763eee38e 100755 --- a/test/network/net_defaultgw.exp +++ b/test/network/net_defaultgw.exp | |||
@@ -41,7 +41,8 @@ expect { | |||
41 | send -- "ip route show\r" | 41 | send -- "ip route show\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 10.2\n";exit} | 43 | timeout {puts "TESTING ERROR 10.2\n";exit} |
44 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 44 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
45 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
45 | } | 46 | } |
46 | send -- "exit\r" | 47 | send -- "exit\r" |
47 | after 100 | 48 | after 100 |
diff --git a/test/network/net_defaultgw2.exp b/test/network/net_defaultgw2.exp index 088dfeee8..e7483c921 100755 --- a/test/network/net_defaultgw2.exp +++ b/test/network/net_defaultgw2.exp | |||
@@ -29,13 +29,15 @@ expect { | |||
29 | send -- "ip route show\r" | 29 | send -- "ip route show\r" |
30 | expect { | 30 | expect { |
31 | timeout {puts "TESTING ERROR 10.2\n";exit} | 31 | timeout {puts "TESTING ERROR 10.2\n";exit} |
32 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 32 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
33 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
33 | } | 34 | } |
34 | 35 | ||
35 | send -- "ip route show\r" | 36 | send -- "ip route show\r" |
36 | expect { | 37 | expect { |
37 | timeout {puts "TESTING ERROR 10.3\n";exit} | 38 | timeout {puts "TESTING ERROR 10.3\n";exit} |
38 | "10.10.30.0/24 dev eth1 proto kernel scope link" | 39 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "old iproute2\n";} |
40 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "new iproute2\n";} | ||
39 | } | 41 | } |
40 | send -- "exit\r" | 42 | send -- "exit\r" |
41 | after 100 | 43 | after 100 |
diff --git a/test/network/net_ip.exp b/test/network/net_ip.exp index c6b84781c..8ec676dd1 100755 --- a/test/network/net_ip.exp +++ b/test/network/net_ip.exp | |||
@@ -67,7 +67,8 @@ expect { | |||
67 | send -- "ip route show\r" | 67 | send -- "ip route show\r" |
68 | expect { | 68 | expect { |
69 | timeout {puts "TESTING ERROR 10\n";exit} | 69 | timeout {puts "TESTING ERROR 10\n";exit} |
70 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 70 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
71 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
71 | } | 72 | } |
72 | send -- "exit\r" | 73 | send -- "exit\r" |
73 | after 100 | 74 | after 100 |
diff --git a/test/network/net_profile.exp b/test/network/net_profile.exp index febbcfcd7..b3bc9b441 100755 --- a/test/network/net_profile.exp +++ b/test/network/net_profile.exp | |||
@@ -38,13 +38,15 @@ sleep 1 | |||
38 | send -- "ip route show\r" | 38 | send -- "ip route show\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 1\n";exit} | 40 | timeout {puts "TESTING ERROR 1\n";exit} |
41 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" | 41 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "old iproute2\n";} |
42 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "new iproute2\n";} | ||
42 | } | 43 | } |
43 | 44 | ||
44 | send -- "ip route show\r" | 45 | send -- "ip route show\r" |
45 | expect { | 46 | expect { |
46 | timeout {puts "TESTING ERROR 2\n";exit} | 47 | timeout {puts "TESTING ERROR 2\n";exit} |
47 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" | 48 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "old iproute2\n";} |
49 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "new iproute2\n";} | ||
48 | } | 50 | } |
49 | 51 | ||
50 | 52 | ||