[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f64966f-ef7a-474a-9641-561b6b7cb0d2@t-8ch.de>
Date: Wed, 17 Sep 2025 18:24:13 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Kees Cook <kees@...nel.org>, Eric Biederman <ebiederm@...ssion.com>,
Shuah Khan <shuah@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Vincenzo Frascino <vincenzo.frascino@....com>,
Willy Tarreau <w@....eu>, "Jason A. Donenfeld" <Jason@...c4.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH v2 16/16] selftests: vDSO: vdso_standalone_test_x86:
Switch to nolibc
Hi Jason,
On 2025-09-17 12:32:09-0300, Jason Gunthorpe wrote:
> On Wed, Feb 26, 2025 at 12:44:55PM +0100, Thomas Weißschuh wrote:
>
> > -$(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
> > -$(OUTPUT)/vdso_standalone_test_x86: CFLAGS +=-nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
> > +$(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c | headers
> > +$(OUTPUT)/vdso_standalone_test_x86: CFLAGS:=$(CFLAGS_NOLIBC) $(CFLAGS)
>
> This addition of "| headers" breaks O=build builds. ie this:
>
> $ make O=build-x86 allnoconfig -s -j 14
> $ make O=build-x86 -s -j 14
> $ make O=build-x86 kselftest-all -s -j 16 &> /dev/null || true
> $ make O=build-x86 -s -j 14
>
> Fails with:
>
> ***
> *** The source tree is not clean, please run 'make mrproper'
> *** in /home/jgg/oss/wip/kselftests_dirty
> ***
>
> Because the build now spews stuff outside the build directory that it
> should not do.. Bisection points to this patch and removing the "|
> headers" makes it stop doing that..
Sorry for the breakage and thanks for the report.
> Any idea how to fix it?
Care to try this:
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 530390033929..a448fae57831 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -228,7 +228,10 @@ $(OUTPUT)/%:%.S
$(LINK.S) $^ $(LDLIBS) -o $@
endif
+# Extract the expected header directory
+khdr_output := $(patsubst %/usr/include,%,$(filter %/usr/include,$(KHDR_INCLUDES)))
+
headers:
- $(Q)$(MAKE) -C $(top_srcdir) headers
+ $(Q)$(MAKE) -f $(top_srcdir)/Makefile -C $(khdr_output) headers
.PHONY: run_tests all clean install emit_tests gen_mods_dir clean_mods_dir headers
Thomas
Powered by blists - more mailing lists