netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] selftests: forwarding: Delete IPv6 address at the end
@ 2019-12-09  6:56 Ido Schimmel
  2019-12-09 18:20 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Ido Schimmel @ 2019-12-09  6:56 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.com>

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.

Fixes: 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 tools/testing/selftests/net/forwarding/router_bridge_vlan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh b/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh
index fef88eb4b873..fa6a88c50750 100755
--- a/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh
+++ b/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh
@@ -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()
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: forwarding: Delete IPv6 address at the end
  2019-12-09  6:56 [PATCH net] selftests: forwarding: Delete IPv6 address at the end Ido Schimmel
@ 2019-12-09 18:20 ` David Miller
  2019-12-10  9:26   ` Ido Schimmel
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-12-09 18:20 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, mlxsw, idosch

From: Ido Schimmel <idosch@idosch.org>
Date: Mon,  9 Dec 2019 08:56:34 +0200

> From: Ido Schimmel <idosch@mellanox.com>
> 
> 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.
> 
> Fixes: 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: forwarding: Delete IPv6 address at the end
  2019-12-09 18:20 ` David Miller
@ 2019-12-10  9:26   ` Ido Schimmel
  0 siblings, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2019-12-10  9:26 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, jiri, mlxsw, idosch

On Mon, Dec 09, 2019 at 10:20:50AM -0800, David Miller wrote:
> From: Ido Schimmel <idosch@idosch.org>
> Date: Mon,  9 Dec 2019 08:56:34 +0200
> 
> > From: Ido Schimmel <idosch@mellanox.com>
> > 
> > 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.
> > 
> > Fixes: 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface")
> > Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> 
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-10  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09  6:56 [PATCH net] selftests: forwarding: Delete IPv6 address at the end Ido Schimmel
2019-12-09 18:20 ` David Miller
2019-12-10  9:26   ` Ido Schimmel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).