Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: net: include lib/sh/*.sh with lib.sh

Recently, the net/lib.sh file has been modified to include defer.sh from
net/lib/sh/ directory. The Makefile from net/lib has been modified
accordingly, but not the ones from the sub-targets using net/lib.sh.

Because of that, the new file is not installed as expected when
installing the Forwarding, MPTCP, and Netfilter targets, e.g.

# make -C tools/testing/selftests TARGETS=net/mptcp install \
INSTALL_PATH=/tmp/kself
# cd /tmp/kself/
# ./run_kselftest.sh -c net/mptcp
TAP version 13
1..7
# timeout set to 1800
# selftests: net/mptcp: mptcp_connect.sh
# ./../lib.sh: line 5: /tmp/kself/net/lib/sh/defer.sh: No such file
or directory
# (...)

This can be fixed simply by adding all the .sh files from net/lib/sh
directory to the TEST_INCLUDES variable in the different Makefile's.

Fixes: a6e263f125cd ("selftests: net: lib: Introduce deferred commands")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/20241104-net-next-selftests-lib-sh-deps-v1-1-7c9f7d939fc2@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Matthieu Baerts (NGI0) and committed by
Jakub Kicinski
f72aa1b2 0452a2d8

+5 -3
+2 -1
tools/testing/selftests/net/forwarding/Makefile
··· 126 126 tc_common.sh 127 127 128 128 TEST_INCLUDES := \ 129 - ../lib.sh 129 + ../lib.sh \ 130 + $(wildcard ../lib/sh/*.sh) 130 131 131 132 include ../../lib.mk
+1 -1
tools/testing/selftests/net/mptcp/Makefile
··· 11 11 12 12 TEST_FILES := mptcp_lib.sh settings 13 13 14 - TEST_INCLUDES := ../lib.sh ../net_helper.sh 14 + TEST_INCLUDES := ../lib.sh $(wildcard ../lib/sh/*.sh) ../net_helper.sh 15 15 16 16 EXTRA_CLEAN := *.pcap 17 17
+2 -1
tools/testing/selftests/net/netfilter/Makefile
··· 55 55 TEST_FILES += packetdrill 56 56 57 57 TEST_INCLUDES := \ 58 - ../lib.sh 58 + ../lib.sh \ 59 + $(wildcard ../lib/sh/*.sh)