Skip to content

Commit 7a649f3

Browse files
Alez87kuba-moo
authored andcommitted
selftests/net/forwarding: teamd command not found
Running "make kselftest TARGETS=net/forwarding" results in multiple ccurrences of the same error: - ./lib.sh: line 787: teamd: command not found This patch adds the variable $REQUIRE_TEAMD in every test that uses the command teamd and checks the $REQUIRE_TEAMD variable in the file "lib.sh" to skip the test if the command is not installed. Signed-off-by: Alessandro Zanni <alessandro.zanni87@gmail.com> Link: https://patch.msgid.link/20250114003323.97207-1-alessandro.zanni87@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2974e66 commit 7a649f3

File tree

8 files changed

+11
-0
lines changed

8 files changed

+11
-0
lines changed

tools/testing/selftests/drivers/net/mlxsw/rif_bridge.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ALL_TESTS="
1212
bridge_rif_remaster_port
1313
"
1414

15+
REQUIRE_TEAMD="yes"
1516
NUM_NETIFS=2
1617
source $lib_dir/lib.sh
1718
source $lib_dir/devlink_lib.sh

tools/testing/selftests/drivers/net/mlxsw/rif_lag.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ALL_TESTS="
1010
lag_rif_nomaster_addr
1111
"
1212

13+
REQUIRE_TEAMD="yes"
1314
NUM_NETIFS=2
1415
source $lib_dir/lib.sh
1516
source $lib_dir/devlink_lib.sh

tools/testing/selftests/drivers/net/mlxsw/rif_lag_vlan.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ALL_TESTS="
1010
lag_rif_nomaster_addr
1111
"
1212

13+
REQUIRE_TEAMD="yes"
1314
NUM_NETIFS=2
1415
source $lib_dir/lib.sh
1516
source $lib_dir/devlink_lib.sh

tools/testing/selftests/net/forwarding/lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ declare -A NETIFS=(
6868
: "${REQUIRE_JQ:=yes}"
6969
: "${REQUIRE_MZ:=yes}"
7070
: "${REQUIRE_MTOOLS:=no}"
71+
: "${REQUIRE_TEAMD:=no}"
7172

7273
# Whether to override MAC addresses on interfaces participating in the test.
7374
: "${STABLE_MAC_ADDRS:=no}"
@@ -321,6 +322,9 @@ fi
321322
if [[ "$REQUIRE_MZ" = "yes" ]]; then
322323
require_command $MZ
323324
fi
325+
if [[ "$REQUIRE_TEAMD" = "yes" ]]; then
326+
require_command $TEAMD
327+
fi
324328
if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then
325329
# https://github.com/troglobit/mtools
326330
require_command msend

tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ ALL_TESTS="
4949
test_mirror_gretap_second
5050
"
5151

52+
REQUIRE_TEAMD="yes"
5253
NUM_NETIFS=6
5354
source lib.sh
5455
source mirror_lib.sh

tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ ALL_TESTS="
5353
test_mirror_gretap_second
5454
"
5555

56+
REQUIRE_TEAMD="yes"
5657
NUM_NETIFS=6
5758
source lib.sh
5859
source mirror_lib.sh

tools/testing/selftests/net/forwarding/router_bridge_1d_lag.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ ALL_TESTS="
109109
ping_ipv4
110110
ping_ipv6
111111
"
112+
REQUIRE_TEAMD="yes"
112113
NUM_NETIFS=8
113114
source lib.sh
114115

tools/testing/selftests/net/forwarding/router_bridge_lag.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
ping_ipv4
7777
ping_ipv6
7878
"}
79+
REQUIRE_TEAMD="yes"
7980
NUM_NETIFS=8
8081
: ${lib_dir:=.}
8182
source $lib_dir/lib.sh

0 commit comments

Comments
 (0)