selftests: forwarding: Delete IPv6 address at the end
Subsystems (4)
PATCH 1/1 selftests: forwarding: Delete IPv6 address at the end
From: Ido Schimmel <[email protected]>
When creating the second host in h2_create(), two addresses are assigned to the interface, but only one is deleted. When running the test twice in a row the following error is observed:
$ ./router_bridge_vlan.sh TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ] $ ./router_bridge_vlan.sh RTNETLINK answers: File exists TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ]
Fix this by deleting the address during cleanup.
--- tools/testing/selftests/net/forwarding/router_bridge_vlan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/router_bridge_vlan.sh +1 -1
@@ -36,7 +36,7 @@ h2_destroy() { ip -6 route del 2001:db8:1::/64 vrf v$h2 ip -4 route del 192.0.2.0/28 vrf v$h2 - simple_if_fini $h2 192.0.2.130/28 + simple_if_fini $h2 192.0.2.130/28 2001:db8:2::2/64 } router_create()
Signature · 1 line
2.23.0
From: Ido Schimmel <[email protected]>
Date: Mon, 9 Dec 2019 08:56:34 +0200
Quoted 16 lines
From: Ido Schimmel <[email protected]>
When creating the second host in
h2_create(), two addresses are assigned to the interface, but only one is deleted. When running the test twice in a row the following error is observed:$ ./router_bridge_vlan.sh TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ] $ ./router_bridge_vlan.sh RTNETLINK answers: File exists TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ]
Quoted 4 lines
Fix this by deleting the address during cleanup.
Fixes 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface")Signed-off-by Ido Schimmel <[email protected]>
Applied, but wasn't the idea that we run these things in a separate network namespace so that we don't pollute the top level config even if the script dies mid-way or something?
Quoted 19 lines · David Miller
From: Ido Schimmel <[email protected]>
Date: Mon, 9 Dec 2019 08:56:34 +0200Quoted 16 lines
From: Ido Schimmel <[email protected]>
When creating the second host in
h2_create(), two addresses are assigned to the interface, but only one is deleted. When running the test twice in a row the following error is observed:$ ./router_bridge_vlan.sh TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ] $ ./router_bridge_vlan.sh RTNETLINK answers: File exists TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ]
Quoted 8 lines
Quoted 4 lines
Fix this by deleting the address during cleanup.
Fixes 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface")Signed-off-by Ido Schimmel <[email protected]>Applied, but wasn't the idea that we run these things in a separate network namespace so that we don't pollute the top level config even if the script dies mid-way or something?
Dave,
This is not the case for the forwarding tests. We use them to test both the kernel data path (using veth pairs) and the hardware data path (using physical loopbacks). Until recently we couldn't move the hardware ports to a different network namespace, which is why these tests were not written using namespaces. While using namespaces will avoid such problems, it will also prolong the time it takes to run these tests, given the devlink instance needs to be reloaded each time. On a normal kernel this adds another ~5 seconds to each test. On a debug kernel (one configuration we test) this adds another ~35 seconds.