netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	schultz.hans@gmail.com, razor@blackwall.org, mlxsw@nvidia.com,
	Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 1/2] selftests: forwarding: Disable learning before link up
Date: Mon, 21 Mar 2022 19:51:01 +0200	[thread overview]
Message-ID: <20220321175102.978020-2-idosch@nvidia.com> (raw)
In-Reply-To: <20220321175102.978020-1-idosch@nvidia.com>

Disable learning before bringing the bridge port up in order to avoid
the FDB being populated and the test failing.

Before:

 # ./bridge_locked_port.sh
 RTNETLINK answers: File exists
 TEST: Locked port ipv4                                              [FAIL]
         Ping worked after locking port, but before adding FDB entry
 TEST: Locked port ipv6                                              [ OK ]
 TEST: Locked port vlan                                              [ OK ]

After:

 # ./bridge_locked_port.sh
 TEST: Locked port ipv4                                              [ OK ]
 TEST: Locked port ipv6                                              [ OK ]
 TEST: Locked port vlan                                              [ OK ]

Fixes: b2b681a41251 ("selftests: forwarding: tests of locked port feature")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 tools/testing/selftests/net/forwarding/bridge_locked_port.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/bridge_locked_port.sh b/tools/testing/selftests/net/forwarding/bridge_locked_port.sh
index 6e98efa6d371..67ce59bb3555 100755
--- a/tools/testing/selftests/net/forwarding/bridge_locked_port.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_locked_port.sh
@@ -41,11 +41,11 @@ switch_create()
 	ip link set dev $swp1 master br0
 	ip link set dev $swp2 master br0
 
+	bridge link set dev $swp1 learning off
+
 	ip link set dev br0 up
 	ip link set dev $swp1 up
 	ip link set dev $swp2 up
-
-	bridge link set dev $swp1 learning off
 }
 
 switch_destroy()
-- 
2.33.1


  reply	other threads:[~2022-03-21 17:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 17:51 [PATCH net-next 0/2] selftests: forwarding: Locked bridge port fixes Ido Schimmel
2022-03-21 17:51 ` Ido Schimmel [this message]
2022-03-21 17:51 ` [PATCH net-next 2/2] selftests: forwarding: Use same VRF for port and VLAN upper Ido Schimmel
2022-03-21 17:53 ` [PATCH net-next 0/2] selftests: forwarding: Locked bridge port fixes Ido Schimmel
2022-03-21 18:06   ` Jakub Kicinski
2022-03-22 11:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220321175102.978020-2-idosch@nvidia.com \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=schultz.hans@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).