selftests: net: use ip commands instead of teamd in team rx_mode test

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>
This commit is contained in:
Stanislav Fomichev
2026-04-16 11:57:12 -07:00
committed by Paolo Abeni
parent ee514cdb07
commit c4dde411bc
2 changed files with 3 additions and 16 deletions

View 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

View File

@@ -42,8 +42,6 @@ team_cleanup()
}
require_command teamd
trap cleanup EXIT
tests_run