* [PATCH] selftests/futex: Conditionally run futex_numa_mpol test
@ 2025-09-08 11:37 Wake Liu
2025-09-12 19:49 ` André Almeida
2025-09-12 21:44 ` Sebastian Andrzej Siewior
0 siblings, 2 replies; 3+ messages in thread
From: Wake Liu @ 2025-09-08 11:37 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Shuah Khan
Cc: Peter Zijlstra, Darren Hart, Davidlohr Bueso, André Almeida,
Sebastian Andrzej Siewior, Wake Liu, linux-kernel,
linux-kselftest
The futex_numa_mpol test requires libnuma, which is not available on
all platforms. When the test is not built, the run.sh script fails
because it unconditionally tries to execute the test binary.
Check for the futex_numa_mpol executable before running it. If the
binary is not present, print a skip message and continue.
This allows the test suite to run successfully on platforms that do
not have libnuma and therefore do not build the futex_numa_mpol
test.
Signed-off-by: Wake Liu <wakel@google.com>
---
tools/testing/selftests/futex/functional/run.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
index 81739849f299..f3e43eb806bf 100755
--- a/tools/testing/selftests/futex/functional/run.sh
+++ b/tools/testing/selftests/futex/functional/run.sh
@@ -88,4 +88,8 @@ echo
./futex_priv_hash -g $COLOR
echo
-./futex_numa_mpol $COLOR
+if [ -x ./futex_numa_mpol ]; then
+ ./futex_numa_mpol $COLOR
+else
+ echo "SKIP: futex_numa_mpol (not built)"
+fi
--
2.51.0.355.g5224444f11-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/futex: Conditionally run futex_numa_mpol test
2025-09-08 11:37 [PATCH] selftests/futex: Conditionally run futex_numa_mpol test Wake Liu
@ 2025-09-12 19:49 ` André Almeida
2025-09-12 21:44 ` Sebastian Andrzej Siewior
1 sibling, 0 replies; 3+ messages in thread
From: André Almeida @ 2025-09-12 19:49 UTC (permalink / raw)
To: Wake Liu
Cc: Peter Zijlstra, Darren Hart, Shuah Khan, Davidlohr Bueso,
Thomas Gleixner, Ingo Molnar, Sebastian Andrzej Siewior,
linux-kernel, linux-kselftest
Em 08/09/2025 08:37, Wake Liu escreveu:
> The futex_numa_mpol test requires libnuma, which is not available on
> all platforms. When the test is not built, the run.sh script fails
> because it unconditionally tries to execute the test binary.
>
> Check for the futex_numa_mpol executable before running it. If the
> binary is not present, print a skip message and continue.
>
> This allows the test suite to run successfully on platforms that do
> not have libnuma and therefore do not build the futex_numa_mpol
> test.
>
> Signed-off-by: Wake Liu <wakel@google.com>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/futex: Conditionally run futex_numa_mpol test
2025-09-08 11:37 [PATCH] selftests/futex: Conditionally run futex_numa_mpol test Wake Liu
2025-09-12 19:49 ` André Almeida
@ 2025-09-12 21:44 ` Sebastian Andrzej Siewior
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-09-12 21:44 UTC (permalink / raw)
To: Wake Liu
Cc: Thomas Gleixner, Ingo Molnar, Shuah Khan, Peter Zijlstra,
Darren Hart, Davidlohr Bueso, André Almeida, linux-kernel,
linux-kselftest
On 2025-09-08 19:37:20 [+0800], Wake Liu wrote:
> The futex_numa_mpol test requires libnuma, which is not available on
> all platforms. When the test is not built, the run.sh script fails
> because it unconditionally tries to execute the test binary.
>
> Check for the futex_numa_mpol executable before running it. If the
> binary is not present, print a skip message and continue.
>
> This allows the test suite to run successfully on platforms that do
> not have libnuma and therefore do not build the futex_numa_mpol
> test.
If you skip the test, how to you compile this?
Does
https://lore.kernel.org/all/20250818135458.F352St6W@linutronix.de/
help?
> Signed-off-by: Wake Liu <wakel@google.com>
> ---
> tools/testing/selftests/futex/functional/run.sh | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
> index 81739849f299..f3e43eb806bf 100755
> --- a/tools/testing/selftests/futex/functional/run.sh
> +++ b/tools/testing/selftests/futex/functional/run.sh
> @@ -88,4 +88,8 @@ echo
> ./futex_priv_hash -g $COLOR
>
> echo
> -./futex_numa_mpol $COLOR
> +if [ -x ./futex_numa_mpol ]; then
> + ./futex_numa_mpol $COLOR
> +else
> + echo "SKIP: futex_numa_mpol (not built)"
> +fi
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-12 21:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 11:37 [PATCH] selftests/futex: Conditionally run futex_numa_mpol test Wake Liu
2025-09-12 19:49 ` André Almeida
2025-09-12 21:44 ` Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox