]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/net/forwarding: teamd command not found
authorAlessandro Zanni <alessandro.zanni87@gmail.com>
Tue, 14 Jan 2025 00:33:16 +0000 (01:33 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 15 Jan 2025 22:14:40 +0000 (14:14 -0800)
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>
tools/testing/selftests/drivers/net/mlxsw/rif_bridge.sh
tools/testing/selftests/drivers/net/mlxsw/rif_lag.sh
tools/testing/selftests/drivers/net/mlxsw/rif_lag_vlan.sh
tools/testing/selftests/net/forwarding/lib.sh
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh
tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh
tools/testing/selftests/net/forwarding/router_bridge_1d_lag.sh
tools/testing/selftests/net/forwarding/router_bridge_lag.sh

index b79542a4dcc71bf6f4edc0ed2bfca75e4d48f1b9..4a11bf1d514acc7079d0304808f0e9a35713133e 100755 (executable)
@@ -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
index e28f978104f3e8f7609ea5144029f0f0908e2c67..b8bbe94f47364ff7189761cce015de48991b4ecb 100755 (executable)
@@ -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
index 6318cfa6434c2c1aa9474d43fb34be19e5890f45..d1a9d379eaf3c13c993adcb89a656fd8b086744b 100755 (executable)
@@ -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
index 1fd40bada69494e6b36509517e8273fe9eb317af..8de80acf249ea055797faf3118ded9aea5b87abe 100644 (file)
@@ -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
index fe4d7c906a708c600bac13d2efd676cdac67e353..a20d22d1df362623ba204678d7d7c3ae35fcd805 100755 (executable)
@@ -49,6 +49,7 @@ ALL_TESTS="
        test_mirror_gretap_second
 "
 
+REQUIRE_TEAMD="yes"
 NUM_NETIFS=6
 source lib.sh
 source mirror_lib.sh
index 1261e6f46e3488b30a819e831a2eaa4c60a06057..ff7049582d352df55f399f3da4b0e5c467dc6f9a 100755 (executable)
@@ -53,6 +53,7 @@ ALL_TESTS="
        test_mirror_gretap_second
 "
 
+REQUIRE_TEAMD="yes"
 NUM_NETIFS=6
 source lib.sh
 source mirror_lib.sh
index e064b946e8213b24d54e10c9e482a478481a3eae..16583a470ec30b2d5f112b0ab59416081f97790f 100755 (executable)
@@ -109,6 +109,7 @@ ALL_TESTS="
        ping_ipv4
        ping_ipv6
 "
+REQUIRE_TEAMD="yes"
 NUM_NETIFS=8
 source lib.sh
 
index f05ffe213c4611c4039ecc14a2301361ed23b3ee..2a4cd1af1b85bcce43ab8f138505ebe8895dd2ad 100755 (executable)
@@ -76,6 +76,7 @@
        ping_ipv4
        ping_ipv6
     "}
+REQUIRE_TEAMD="yes"
 NUM_NETIFS=8
 : ${lib_dir:=.}
 source $lib_dir/lib.sh