mirror_ubuntu-kernels/tools/testing/selftests/drivers/net
Benjamin Poirier 8cc063ae1b selftests: bonding: Check initial state
The purpose of the test_LAG_cleanup() function is to check that some
hardware addresses are removed from underlying devices after they have been
unenslaved. The test function simply checks that those addresses are not
present at the end. However, if the addresses were never added to begin
with due to some error in device setup, the test function currently passes.
This is a false positive since in that situation the test did not actually
exercise the intended functionality.

Add a check that the expected addresses are indeed present after device
setup. This makes the test function more robust.

I noticed this problem when running the team/dev_addr_lists.sh test on a
system without support for dummy and ipv6:

tools/testing/selftests/drivers/net/team# ./dev_addr_lists.sh
Error: Unknown device type.
Error: Unknown device type.
This program is not intended to be run as root.
RTNETLINK answers: Operation not supported
TEST: team cleanup mode lacp                                        [ OK ]

Fixes: bbb774d921 ("net: Add tests for bonding and team address list management")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Link: https://lore.kernel.org/r/20240131140848.360618-3-bpoirier@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-02-01 08:36:24 -08:00
..
bonding selftests: bonding: Check initial state 2024-02-01 08:36:24 -08:00
dsa perf tests test_bridge_fdb_stress.sh: Fix redirection of stderr to stdin 2023-04-04 09:39:55 -03:00
mlxsw selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes 2024-01-18 09:48:09 -08:00
netdevsim selftests: netdevsim: fix the udp_tunnel_nic test 2024-01-24 15:11:10 -08:00
ocelot selftests: ocelot: tc_flower_chains: make test_vlan_ingress_modify() more comprehensive 2023-02-07 12:20:21 +01:00
team selftests: team: Add missing config options 2024-02-01 08:36:20 -08:00