* [PATCH] selftests: Fix Makefile to run targets even the ones in SKIP_TARGETS
@ 2025-09-20 4:19 I Viswanath
2025-09-22 22:57 ` David Hunter
0 siblings, 1 reply; 2+ messages in thread
From: I Viswanath @ 2025-09-20 4:19 UTC (permalink / raw)
To: shuah
Cc: linux-kselftest, linux-kernel, skhan, linux-kernel-mentees,
david.hunter.linux, I Viswanath
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)
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests: Fix Makefile to run targets even the ones in SKIP_TARGETS
2025-09-20 4:19 [PATCH] selftests: Fix Makefile to run targets even the ones in SKIP_TARGETS I Viswanath
@ 2025-09-22 22:57 ` David Hunter
0 siblings, 0 replies; 2+ messages in thread
From: David Hunter @ 2025-09-22 22:57 UTC (permalink / raw)
To: I Viswanath, shuah
Cc: linux-kselftest, linux-kernel, skhan, linux-kernel-mentees
On 9/20/25 00:19, I Viswanath wrote:
> 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 ]
>
Hi Viswaneth,
After the "---" usually the change log is placed. The change log
contains the changes from version 1. Also if this is a version 2 patch,
it is best to note it in the subject line. The v2 helps people keep up
with which patch is the most recent.
Thanks,
David Hunter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-22 22:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-20 4:19 [PATCH] selftests: Fix Makefile to run targets even the ones in SKIP_TARGETS I Viswanath
2025-09-22 22:57 ` David Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox