]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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 bf9bcd1b5ec04179b54c3edcb86932788eaab6ae..f2e43b6c4c8117a14e9d5a7f0a43ac0a7342e134 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
index b1ec7755b7830739faa60f88d1971c3da8634559..26469f3be02231cacf17a12f819032b261f64ce3 100755 (executable)
@@ -42,8 +42,6 @@ team_cleanup()
 }
 
 
-require_command teamd
-
 trap cleanup EXIT
 
 tests_run