The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] kbuild: unset sub_make_done before calling kselftest build system
@ 2026-07-03  6:04 Thomas Weißschuh
  2026-07-03  6:14 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thomas Weißschuh @ 2026-07-03  6:04 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: linux-kbuild, linux-kernel, Miroslav Benes, Petr Mladek,
	live-patching, shuah, linux-kselftest, Zelin Deng,
	Thomas Weißschuh

The kselftest build system may recourse back into kbuild when building
test modules. In that case kbuild needs to parse the new flags passed
from the command line, instead of using the ones inherited from the
kbuild invocation.

Force that command line reevaluation.

The same was done for scripts/install.sh in commit 14ccc638b02f9ec
("kbuild: cancel sub_make_done for the install target to fix DKMS")

Reported-by: Zelin Deng <zelin.deng@linux.alibaba.com>
Closes: https://lore.kernel.org/all/20260525083721.27857-1-zelin.deng@linux.alibaba.com/
Fixes: c9bb03ac2c66 ("kbuild: reduce output spam when building out of tree")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b9c5792c79e0..f717a4dc96d6 100644
--- a/Makefile
+++ b/Makefile
@@ -1591,10 +1591,10 @@ tools/%: FORCE
 
 PHONY += kselftest
 kselftest: headers
-	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
+	$(Q)unset sub_make_done; $(MAKE) -C $(srctree)/tools/testing/selftests run_tests
 
 kselftest-%: headers FORCE
-	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
+	$(Q)unset sub_make_done; $(MAKE) -C $(srctree)/tools/testing/selftests $*
 
 PHONY += kselftest-merge
 kselftest-merge:

---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260702-makefile-unset-submake-done-cbc0b9375617

Best regards,
--  
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-04  1:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03  6:04 [PATCH] kbuild: unset sub_make_done before calling kselftest build system Thomas Weißschuh
2026-07-03  6:14 ` sashiko-bot
2026-07-03  8:26   ` Petr Mladek
2026-07-03  9:32     ` Thomas Weißschuh
2026-07-03 10:06       ` Petr Mladek
2026-07-03 19:24         ` Nicolas Schier
2026-07-03  8:25 ` Petr Mladek
2026-07-03 19:25   ` Nicolas Schier
2026-07-04  1:59   ` Zelin Deng
2026-07-03  8:39 ` Miroslav Benes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox