summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/Makefile
diff options
context:
space:
mode:
authorRicardo B. Marlière <rbm@suse.com>2026-06-02 10:02:53 -0300
committerAlexei Starovoitov <ast@kernel.org>2026-06-05 14:20:58 -0700
commita97bfc9aae076f49f0bcad713bde02b87553b995 (patch)
tree474ea8de8f4123ef8db2c942d3ba07ea1a6740ed /tools/testing/selftests/bpf/Makefile
parentc476bdf27657c6ea4a447c18de169c7bdcdd419d (diff)
downloadlinux-next-a97bfc9aae076f49f0bcad713bde02b87553b995.tar.gz
linux-next-a97bfc9aae076f49f0bcad713bde02b87553b995.zip
selftests/bpf: Avoid rebuilds when running emit_tests
emit_tests is used while installing selftests to generate the kselftest list. Pulling in .d files for this goal can trigger BPF rebuild rules and mix build output into list generation. Skip dependency file inclusion for emit_tests, like clean goals, so list generation stays side-effect free. Also add emit_tests to NON_CHECK_FEAT_TARGETS so that feature detection is skipped; without this, Makefile.feature's $(info) output leaks into stdout and corrupts the test list captured by the top-level selftests Makefile. Signed-off-by: Ricardo B. Marlière <rbm@suse.com> Link: https://lore.kernel.org/r/20260602-selftests-bpf_misconfig-v12-4-27f898b3ba26@suse.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/Makefile')
-rw-r--r--tools/testing/selftests/bpf/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index dc1f4a4a3582..49f6a5503e84 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -170,7 +170,7 @@ endef
include ../lib.mk
-NON_CHECK_FEAT_TARGETS := clean docs-clean
+NON_CHECK_FEAT_TARGETS := clean docs-clean emit_tests
CHECK_FEAT := $(filter-out $(NON_CHECK_FEAT_TARGETS),$(or $(MAKECMDGOALS), "none"))
ifneq ($(CHECK_FEAT),)
FEATURE_USER := .selftests
@@ -732,7 +732,7 @@ $(TRUNNER_TEST_OBJS:.o=.d): $(TRUNNER_OUTPUT)/%.test.d: \
$(TRUNNER_BPF_SKELS_LINKED) \
$$(BPFOBJ) | $(TRUNNER_OUTPUT)
-ifeq ($(filter clean docs-clean,$(MAKECMDGOALS)),)
+ifeq ($(filter clean docs-clean emit_tests,$(MAKECMDGOALS)),)
include $(wildcard $(TRUNNER_TEST_OBJS:.o=.d))
endif