This is a note to let you know that I've just added the patch titled selftests: forwarding: Skip test when no interfaces are specified to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-forwarding-skip-test-when-no-interfaces-are-specified.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d72c83b1e4b4a36a38269c77a85ff52f95eb0d08 Mon Sep 17 00:00:00 2001 From: Ido Schimmel <idosch@xxxxxxxxxx> Date: Tue, 8 Aug 2023 17:14:47 +0300 Subject: selftests: forwarding: Skip test when no interfaces are specified From: Ido Schimmel <idosch@xxxxxxxxxx> commit d72c83b1e4b4a36a38269c77a85ff52f95eb0d08 upstream. As explained in [1], the forwarding selftests are meant to be run with either physical loopbacks or veth pairs. The interfaces are expected to be specified in a user-provided forwarding.config file or as command line arguments. By default, this file is not present and the tests fail: # make -C tools/testing/selftests TARGETS=net/forwarding run_tests [...] TAP version 13 1..102 # timeout set to 45 # selftests: net/forwarding: bridge_igmp.sh # Command line is not complete. Try option "help" # Failed to create netif not ok 1 selftests: net/forwarding: bridge_igmp.sh # exit=1 [...] Fix by skipping a test if interfaces are not provided either via the configuration file or command line arguments. # make -C tools/testing/selftests TARGETS=net/forwarding run_tests [...] TAP version 13 1..102 # timeout set to 45 # selftests: net/forwarding: bridge_igmp.sh # SKIP: Cannot create interface. Name not specified ok 1 selftests: net/forwarding: bridge_igmp.sh # SKIP [1] tools/testing/selftests/net/forwarding/README Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests") Reported-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx> Closes: https://lore.kernel.org/netdev/856d454e-f83c-20cf-e166-6dc06cbc1543@xxxxxxxxxxxx/ Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxx> Reviewed-by: Petr Machata <petrm@xxxxxxxxxx> Tested-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx> Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxx> Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230808141503.4060661-2-idosch@xxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/net/forwarding/lib.sh | 5 +++++ 1 file changed, 5 insertions(+) --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -237,6 +237,11 @@ create_netif_veth() for ((i = 1; i <= NUM_NETIFS; ++i)); do local j=$((i+1)) + if [ -z ${NETIFS[p$i]} ]; then + echo "SKIP: Cannot create interface. Name not specified" + exit $ksft_skip + fi + ip link show dev ${NETIFS[p$i]} &> /dev/null if [[ $? -ne 0 ]]; then ip link add ${NETIFS[p$i]} type veth \ Patches currently in stable-queue which might be from idosch@xxxxxxxxxx are queue-6.4/selftests-forwarding-ethtool-skip-when-using-veth-pairs.patch queue-6.4/selftests-forwarding-bridge_mdb_max-fix-failing-test-with-old-libnet.patch queue-6.4/selftests-forwarding-skip-test-when-no-interfaces-are-specified.patch queue-6.4/selftests-forwarding-bridge_mdb-fix-failing-test-with-old-libnet.patch queue-6.4/selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch queue-6.4/selftests-forwarding-tc_flower-relax-success-criterion.patch queue-6.4/selftests-forwarding-bridge_mdb-check-iproute2-version.patch queue-6.4/selftests-forwarding-bridge_mdb-make-test-more-robust.patch queue-6.4/selftests-forwarding-ethtool_extended_state-skip-when-using-veth-pairs.patch queue-6.4/selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch queue-6.4/selftests-forwarding-add-a-helper-to-skip-test-when-using-veth-pairs.patch queue-6.4/selftests-forwarding-switch-off-timeout.patch queue-6.4/selftests-forwarding-hw_stats_l3_gre-skip-when-using-veth-pairs.patch queue-6.4/selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch queue-6.4/selftests-forwarding-tc_actions-use-ncat-instead-of-nc.patch queue-6.4/selftests-forwarding-set-default-ipv6-traceroute-utility.patch