[PATCH can-next v3 1/9] selftests: can: install net/lib.sh with the CAN tests

From: Oleksij Rempel

Date: Wed Nov 11 2026 - 10:41:46 EST


Add ../lib.sh and ../lib/sh/*.sh to TEST_INCLUDES. net/lib.sh sources
lib/sh/defer.sh. The install needs lib.sh and the lib/sh scripts.

test_raw_filter.sh sources ../lib.sh, but the Makefile does not install
lib.sh. A full selftest install works, because the net tests install
lib.sh. An install of only net/can does not work. The installed
test_raw_filter.sh cannot find lib.sh.

Found by installing the tests with "make TARGETS=net/can install". With
this change the installed test_raw_filter.sh runs.

Fixes: 77442ffa83e8 ("selftests: can: Import tst-filter from can-tests")
Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
Changes in v3:
- No changes.

Changes in v2:
- New in v2. An install of net/can on its own left out net/lib.sh
(sashiko).
---
tools/testing/selftests/net/can/Makefile | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/net/can/Makefile b/tools/testing/selftests/net/can/Makefile
index 5b82e60a03e75ace2cae949ceeab09a497c96074..3adaa13dcbfa303c4be2bb6a9b5dbdac76d68260 100644
--- a/tools/testing/selftests/net/can/Makefile
+++ b/tools/testing/selftests/net/can/Makefile
@@ -6,6 +6,8 @@ CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INC

TEST_PROGS := test_raw_filter.sh

+TEST_INCLUDES := ../lib.sh $(wildcard ../lib/sh/*.sh)
+
TEST_GEN_FILES := test_raw_filter

include ../../lib.mk

--
2.47.3