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

From: Oleksij Rempel

Date: Wed Nov 04 2026 - 11:27:12 EST


Add ../lib.sh and ../lib/sh/*.sh to TEST_INCLUDES, so that they are
installed with the CAN tests. net/lib.sh sources lib/sh/defer.sh.

test_raw_filter.sh sources ../lib.sh, but the Makefile does not list it.
A full selftest install ships it with the net tests, but a selective one,
such as "make TARGETS=net/can install", leaves it out, and the installed
test_raw_filter.sh then fails to source it.

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 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