summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@kylinos.cn>2026-09-07 15:28:09 +0800
committerJakub Kicinski <kuba@kernel.org>2026-09-08 17:32:51 -0700
commit52176ca4e4d030bacc1232d3a31237c741ff7ccb (patch)
tree0083f0328a6080f3636a99cf82e0b1d1b9aeb5b7
parentab30868b5476c50d4f0551576965978e736f3826 (diff)
downloadlinux-next-52176ca4e4d030bacc1232d3a31237c741ff7ccb.tar.gz
linux-next-52176ca4e4d030bacc1232d3a31237c741ff7ccb.zip
selftests/drivers/net: include lib/sh/*.sh
When I tried to install and run bonding selftests via: make INSTALL_PATH=/tmp/kself TARGETS=drivers/net/bonding \ -C tools/testing/selftests install Some tests fail because net/lib/sh/defer.sh is missing: /tmp/kself/net/forwarding/../lib.sh: line 5: /tmp/kself/net/lib/sh/defer.sh: No such file or directory One option is to add defer.sh directly to TEST_INCLUDES. Alternatively, follow the approach from commit f72aa1b27628 ("selftests: net: include lib/sh/*.sh with lib.sh"), which pulls in all .sh files to accommodate future changes to the library directory. This patch adds a wildcard to include all shell files for drivers/net tests that consume net lib.sh. TEST_INCLUDES is also sorted to avoid ordering‑related problems for future modifications. The team driver is not affected by this bug, but we use the wildcard for it as well, rather than listing only defer.sh. Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260907-selftest_lib_defer-v1-1-8af94645aaa3@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--tools/testing/selftests/drivers/net/Makefile1
-rw-r--r--tools/testing/selftests/drivers/net/bonding/Makefile3
-rw-r--r--tools/testing/selftests/drivers/net/dsa/Makefile1
-rw-r--r--tools/testing/selftests/drivers/net/hw/Makefile3
-rw-r--r--tools/testing/selftests/drivers/net/netconsole/Makefile3
-rw-r--r--tools/testing/selftests/drivers/net/team/Makefile4
-rw-r--r--tools/testing/selftests/drivers/net/virtio_net/Makefile1
7 files changed, 11 insertions, 5 deletions
diff --git a/tools/testing/selftests/drivers/net/Makefile b/tools/testing/selftests/drivers/net/Makefile
index 1f21e17d8c22..b98c0e240b7d 100644
--- a/tools/testing/selftests/drivers/net/Makefile
+++ b/tools/testing/selftests/drivers/net/Makefile
@@ -3,6 +3,7 @@ CFLAGS += $(KHDR_INCLUDES)
TEST_INCLUDES := $(wildcard lib/py/*.py) \
$(wildcard lib/sh/*.sh) \
+ $(wildcard ../../net/lib/sh/*.sh) \
../../net/lib.sh \
TEST_GEN_FILES := \
diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile
index 6364ca02642d..e337c099fb40 100644
--- a/tools/testing/selftests/drivers/net/bonding/Makefile
+++ b/tools/testing/selftests/drivers/net/bonding/Makefile
@@ -27,9 +27,10 @@ TEST_FILES := \
# end of TEST_FILES
TEST_INCLUDES := \
- ../../../net/lib.sh \
+ $(wildcard ../../../net/lib/sh/*.sh) \
../lib/sh/lib_netcons.sh \
../../../net/forwarding/lib.sh \
+ ../../../net/lib.sh \
# end of TEST_INCLUDES
include ../../../lib.mk
diff --git a/tools/testing/selftests/drivers/net/dsa/Makefile b/tools/testing/selftests/drivers/net/dsa/Makefile
index 7994bd0e5c44..7893011b3842 100644
--- a/tools/testing/selftests/drivers/net/dsa/Makefile
+++ b/tools/testing/selftests/drivers/net/dsa/Makefile
@@ -19,6 +19,7 @@ TEST_FILES := \
# end of TEST_FILES
TEST_INCLUDES := \
+ $(wildcard ../../../net/lib/sh/*.sh) \
../../../net/forwarding/bridge_locked_port.sh \
../../../net/forwarding/bridge_mdb.sh \
../../../net/forwarding/bridge_mld.sh \
diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile
index f9458dc6c150..bd3b8d2fa47e 100644
--- a/tools/testing/selftests/drivers/net/hw/Makefile
+++ b/tools/testing/selftests/drivers/net/hw/Makefile
@@ -69,10 +69,11 @@ TEST_FILES := \
TEST_INCLUDES := \
$(wildcard lib/py/*.py ../lib/py/*.py) \
- ../../../net/lib.sh \
+ $(wildcard ../../../net/lib/sh/*.sh) \
../../../net/forwarding/ipip_lib.sh \
../../../net/forwarding/lib.sh \
../../../net/forwarding/tc_common.sh \
+ ../../../net/lib.sh \
#
# YNL files, must be before "include ..lib.mk"
diff --git a/tools/testing/selftests/drivers/net/netconsole/Makefile b/tools/testing/selftests/drivers/net/netconsole/Makefile
index f0674c0017fc..c7972a40babf 100644
--- a/tools/testing/selftests/drivers/net/netconsole/Makefile
+++ b/tools/testing/selftests/drivers/net/netconsole/Makefile
@@ -1,8 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
TEST_INCLUDES := \
- ../../../net/lib.sh \
+ $(wildcard ../../../net/lib/sh/*.sh) \
../lib/sh/lib_netcons.sh \
+ ../../../net/lib.sh \
# end of TEST_INCLUDES
TEST_PROGS := \
diff --git a/tools/testing/selftests/drivers/net/team/Makefile b/tools/testing/selftests/drivers/net/team/Makefile
index 7c58cf82121e..e40c83a92724 100644
--- a/tools/testing/selftests/drivers/net/team/Makefile
+++ b/tools/testing/selftests/drivers/net/team/Makefile
@@ -13,12 +13,12 @@ TEST_PROGS := \
# end of TEST_PROGS
TEST_INCLUDES := \
- team_lib.sh \
+ $(wildcard ../../../net/lib/sh/*.sh) \
../bonding/lag_lib.sh \
../../../net/forwarding/lib.sh \
../../../net/in_netns.sh \
../../../net/lib.sh \
- ../../../net/lib/sh/defer.sh \
+ team_lib.sh \
# end of TEST_INCLUDES
include ../../../lib.mk
diff --git a/tools/testing/selftests/drivers/net/virtio_net/Makefile b/tools/testing/selftests/drivers/net/virtio_net/Makefile
index 868ece3fea1f..df34e29b5680 100644
--- a/tools/testing/selftests/drivers/net/virtio_net/Makefile
+++ b/tools/testing/selftests/drivers/net/virtio_net/Makefile
@@ -5,6 +5,7 @@ TEST_PROGS = basic_features.sh
TEST_FILES = virtio_net_common.sh
TEST_INCLUDES = \
+ $(wildcard ../../../net/lib/sh/*.sh) \
../../../net/forwarding/lib.sh \
../../../net/lib.sh \
# end of TEST_INCLUDES