From e77f165d26f72c280654cff248f5106cb9a53951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Fri, 3 Jul 2026 08:04:08 +0200 Subject: [PATCH] kbuild: unset sub_make_done before calling kselftest build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 Acked-by: Miroslav Benes Acked-by: Petr Mladek Tested-by: Zelin Deng Reviewed-by: Nicolas Schier Link: https://patch.msgid.link/20260703-makefile-unset-submake-done-v1-1-6899248f3d6a@linutronix.de Signed-off-by: Petr Mladek --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1c595db55c9..9dac90e563a2 100644 --- a/Makefile +++ b/Makefile @@ -1570,10 +1570,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: