With the current Makefile, if the user tries something like
make TARGETS="bpf mm"
only mm is run and bpf is skipped, which is not intentional.
`bpf` and `sched_ext` are always filtered out even when TARGETS is set explicitly due to how SKIP_TARGETS is implemented.
This default skip exists because these tests require newer LLVM/Clang versions that may not be available on all systems.
Fix the SKIP_TARGETS logic so that bpf and sched_ext remain skipped when TARGETS is taken from the Makefile but are included when the user specifies them explicitly.
Signed-off-by: I Viswanath viswanathiyyappan@gmail.com --- make --silent summary=1 TARGETS="bpf size" kselftest
make[3]: Entering directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/bpf'
Auto-detecting system features: ... llvm: [ OFF ]
Makefile:127: tools/build/Makefile.feature: No such file or directory make[4]: *** No rule to make target 'tools/build/Makefile.feature'. Stop. make[3]: *** [Makefile:344: /home/user/kernel-dev/linux-next/tools/testing/selftests/bpf/tools/sbin/bpftool] Error 2 make[3]: Leaving directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/bpf' make[3]: Nothing to be done for 'all'. make[3]: Entering directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/bpf'
Auto-detecting system features: ... llvm: [ OFF ]
Makefile:127: tools/build/Makefile.feature: No such file or directory make[4]: *** No rule to make target 'tools/build/Makefile.feature'. Stop. make[3]: *** [Makefile:344: /home/user/kernel-dev/linux-next/tools/testing/selftests/bpf/tools/sbin/bpftool] Error 2 make[3]: Leaving directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/bpf' TAP version 13 1..1 # selftests: size: get_size ok 1 selftests: size: get_size
make --silent summary=1 kselftest (bpf is between arm64 and breakpoints in TARGETS)
make[3]: Nothing to be done for 'all'. make[3]: Entering directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/alsa' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/alsa' make[3]: Entering directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/amd-pstate' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/amd-pstate' make[3]: Entering directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/arm64' make[3]: Leaving directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/arm64' make[3]: Entering directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/breakpoints' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/user/kernel-dev/linux-next/tools/testing/selftests/breakpoints' make[3]: Nothing to be done for 'all'.
tools/testing/selftests/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index babed7b1c2d1..c6cedb09c372 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -145,7 +145,10 @@ endif # User can optionally provide a TARGETS skiplist. By default we skip # targets using BPF since it has cutting edge build time dependencies # which require more effort to install. -SKIP_TARGETS ?= bpf sched_ext +ifeq ($(origin TARGETS), file) + SKIP_TARGETS ?= bpf sched_ext +endif + ifneq ($(SKIP_TARGETS),) TMP := $(filter-out $(SKIP_TARGETS), $(TARGETS)) override TARGETS := $(TMP)
linux-kselftest-mirror@lists.linaro.org