Commit 7a649f39 authored by Alessandro Zanni's avatar Alessandro Zanni Committed by Jakub Kicinski
Browse files

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: default avatarAlessandro Zanni <alessandro.zanni87@gmail.com>
Link: https://patch.msgid.link/20250114003323.97207-1-alessandro.zanni87@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2974e66b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ ALL_TESTS="
	bridge_rif_remaster_port
"

REQUIRE_TEAMD="yes"
NUM_NETIFS=2
source $lib_dir/lib.sh
source $lib_dir/devlink_lib.sh
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ ALL_TESTS="
	lag_rif_nomaster_addr
"

REQUIRE_TEAMD="yes"
NUM_NETIFS=2
source $lib_dir/lib.sh
source $lib_dir/devlink_lib.sh
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ ALL_TESTS="
	lag_rif_nomaster_addr
"

REQUIRE_TEAMD="yes"
NUM_NETIFS=2
source $lib_dir/lib.sh
source $lib_dir/devlink_lib.sh
+4 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ declare -A NETIFS=(
: "${REQUIRE_JQ:=yes}"
: "${REQUIRE_MZ:=yes}"
: "${REQUIRE_MTOOLS:=no}"
: "${REQUIRE_TEAMD:=no}"

# Whether to override MAC addresses on interfaces participating in the test.
: "${STABLE_MAC_ADDRS:=no}"
@@ -321,6 +322,9 @@ fi
if [[ "$REQUIRE_MZ" = "yes" ]]; then
	require_command $MZ
fi
if [[ "$REQUIRE_TEAMD" = "yes" ]]; then
	require_command $TEAMD
fi
if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then
	# https://github.com/troglobit/mtools
	require_command msend
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ ALL_TESTS="
	test_mirror_gretap_second
"

REQUIRE_TEAMD="yes"
NUM_NETIFS=6
source lib.sh
source mirror_lib.sh
Loading