selftests: net: use ip commands instead of teamd in team rx_mode test
authorStanislav Fomichev <sdf.kernel@gmail.com>
Thu, 16 Apr 2026 18:57:12 +0000 (11:57 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 21 Apr 2026 10:50:25 +0000 (12:50 +0200)
Replace teamd daemon usage with ip link commands for team device
setup. teamd -d daemonizes and returns to the shell before port
addition completes, creating a race: the test may create the macvlan
(and check for its address on a slave) before teamd has finished
adding ports. This makes the test inherently dependent on scheduling
timing.

Using ip commands makes port addition synchronous, removing the race
and making the test deterministic.

Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Jay Vosburgh <jv@jvosburgh.net>
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260416185712.2155425-16-sdf@fomichev.me
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/drivers/net/bonding/lag_lib.sh
tools/testing/selftests/drivers/net/team/dev_addr_lists.sh

index bf9bcd1..f2e43b6 100644 (file)
@@ -23,20 +23,9 @@ test_LAG_cleanup()
                ip link set dev dummy2 master "$name"
        elif [ "$driver" = "team" ]; then
                name="team0"
-               teamd -d -c '
-                       {
-                               "device": "'"$name"'",
-                               "runner": {
-                                       "name": "'"$mode"'"
-                               },
-                               "ports": {
-                                       "dummy1":
-                                               {},
-                                       "dummy2":
-                                               {}
-                               }
-                       }
-               '
+               ip link add "$name" type team
+               ip link set dev dummy1 master "$name"
+               ip link set dev dummy2 master "$name"
                ip link set dev "$name" up
        else
                check_err 1