* [PATCH] selftests/prctl: select the tests by ARCH alone
@ 2026-11-04 19:36 Sasha Levin
2026-11-04 20:08 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-11-04 19:36 UTC (permalink / raw)
To: Shuah Khan; +Cc: Andrew Morton, Aleksei Oladko, linux-kselftest, linux-kernel
The prctl tests are only built for x86, and only when CROSS_COMPILE is
not set. In every other case the Makefile defines no rules, so building
or installing the suite fails:
make[1]: *** No targets. Stop.
TuxMake sets CROSS_COMPILE for every build, native x86_64 ones
included, so CI systems that use it, such as KernelCI, see prctl fail
on every architecture and never build its tests.
Like breakpoints, ipc and x86, decide by ARCH alone whether the tests
are built, and give the Makefile empty targets on other architectures,
as sparc64 and drivers/s390x/uvdevice do, so that the suite builds and
installs nothing there.
Fixes: 92dd8dd4d07f ("selftests: move prctl tests from Documentation/prctl")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Found with KernelCI-style TuxMake builds that record per-suite results
with KSFT_BUILD_REPORT. With this, an x86_64 build with CROSS_COMPILE
set builds and installs the five tests, arm64 and arm builds succeed
without installing anything, and the tests also compile for i386.
tools/testing/selftests/prctl/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/prctl/Makefile b/tools/testing/selftests/prctl/Makefile
index e770e86fad9ac..b230e4d955061 100644
--- a/tools/testing/selftests/prctl/Makefile
+++ b/tools/testing/selftests/prctl/Makefile
@@ -1,5 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
-ifndef CROSS_COMPILE
ARCH ?= $(shell uname -m 2>/dev/null || echo not)
override ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
@@ -10,5 +9,8 @@ all: $(TEST_PROGS)
include ../lib.mk
-endif
+else
+nothing:
+.PHONY: all clean run_tests install
+.SILENT:
endif
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] selftests/prctl: select the tests by ARCH alone
2026-11-04 19:36 [PATCH] selftests/prctl: select the tests by ARCH alone Sasha Levin
@ 2026-11-04 20:08 ` Andrew Morton
2026-11-04 22:39 ` Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2026-11-04 20:08 UTC (permalink / raw)
To: Sasha Levin; +Cc: Shuah Khan, Aleksei Oladko, linux-kselftest, linux-kernel
On Wed, 4 Nov 2026 14:36:39 -0500 Sasha Levin <sashal@kernel.org> wrote:
> The prctl tests are only built for x86, and only when CROSS_COMPILE is
> not set. In every other case the Makefile defines no rules, so building
> or installing the suite fails:
>
> make[1]: *** No targets. Stop.
>
> TuxMake sets CROSS_COMPILE for every build, native x86_64 ones
> included, so CI systems that use it, such as KernelCI, see prctl fail
> on every architecture and never build its tests.
>
> Like breakpoints, ipc and x86, decide by ARCH alone whether the tests
> are built, and give the Makefile empty targets on other architectures,
> as sparc64 and drivers/s390x/uvdevice do, so that the suite builds and
> installs nothing there.
Well that's annoying, but...
Rather than continuing to make this selftest x86-only, wouldn't it be
better to fix things up so the other architectures also benefit?
In fact someone proposed doing that just last month. Oh, it was you ;)
https://lore.kernel.org/20261014200127.1363472-1-sashal@kernel.org
what happened to that?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/prctl: select the tests by ARCH alone
2026-11-04 20:08 ` Andrew Morton
@ 2026-11-04 22:39 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-11-04 22:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: Shuah Khan, Aleksei Oladko, linux-kselftest, linux-kernel
On Wed, Nov 04, 2026 at 12:08:59PM -0800, Andrew Morton wrote:
> Rather than continuing to make this selftest x86-only, wouldn't it be
> better to fix things up so the other architectures also benefit?
>
> In fact someone proposed doing that just last month. Oh, it was you ;)
>
> https://lore.kernel.org/20261014200127.1363472-1-sashal@kernel.org
>
> what happened to that?
Right now I'm focusing on making our tests "pass", that is, not fail
horribly on non-x86 platforms that they were never designed for. At
the moment it's hard to tell whether anything actually failed, because
everything is red all the time, so my first priority is to get to a
state where we can detect real failures.
Once we're there we can start looking at enabling these tests on more
architectures, but it doesn't really make sense to do that before.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-04 22:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 19:36 [PATCH] selftests/prctl: select the tests by ARCH alone Sasha Levin
2026-11-04 20:08 ` Andrew Morton
2026-11-04 22:39 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®