Message ID | 20220321175102.978020-2-idosch@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 917b149ac3d5c8b3a582559b9779ee29d69fad78 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | selftests: forwarding: Locked bridge port fixes | expand |
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()
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(-)