linux/tools/testing/selftests/drivers
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
..
dma-buf selftests: drivers: Fix incorrect kernel headers search path 2023-02-13 09:09:44 -07:00
gpu selftests/drivers/gpu: Add error messages to drm_mm.sh 2022-06-28 13:32:29 -06:00
net selftests: bonding: Check initial state 2024-02-01 08:36:24 -08:00
s390x/uvdevice selftests: drivers: Fix incorrect kernel headers search path 2023-02-13 09:09:44 -07:00
sdsi selftests: sdsi: test sysfs setup 2022-03-02 14:56:12 +01:00
usb/usbip
.gitignore selftests: drivers/s390x: Add uvdevice tests 2022-05-20 16:38:42 +02:00