The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] selftests/futex_requeue: Increase futex timeout to cover slow hardware
@ 2026-07-03  3:21 Feng Tang
  2026-07-05 20:04 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Feng Tang @ 2026-07-03  3:21 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart,
	Davidlohr Bueso, andrealmeid, Shuah Khan
  Cc: linux-kernel, linux-kselftest, Feng Tang

When running  mixed stress tests (stess-ng, kernel selftests etc.)
on a slow machine, futex 'requeue_multiple' case failed randomly,
with message:
"
    waiter failed errno 110
    not ok 2 futex_requeue many returned: 0 Success
    not ok 3 futex_requeue many returned: 0 Success
    # Planned tests != run tests (2 != 3)
    # Totals: pass:1 fail:2 xfail:0 xpass:0 skip:0 error:0
"

The process of 'requeue_multiple' case will:
* create 10 pthreads with futex (timeout 30 ms)
* wait 10 ms
* start 'futex_cmp_requeue' case

So there is an assumption that the 10 threads can be created in 20 ms,
which is safe enough for normal platforms, while for slow platforms
with stress workload, the creation could take more than 20 ms, and
some futex will timeout and cause the case to fail.

Increasing the timeout to 100 ms to cover slow platforms, which doesn't
hurt normal platforms much.

Signed-off-by: Feng Tang <feng.tang@linux.alibaba.com>
---
 tools/testing/selftests/futex/functional/futex_requeue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/futex/functional/futex_requeue.c b/tools/testing/selftests/futex/functional/futex_requeue.c
index dcf0d5f2f312..2df9e8dfb04c 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue.c
@@ -11,7 +11,7 @@
 #include "futextest.h"
 #include "kselftest_harness.h"
 
-#define timeout_ns  30000000
+#define timeout_ns  100000000
 #define WAKE_WAIT_US 10000
 
 volatile futex_t *f1;
-- 
2.43.5


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

end of thread, other threads:[~2026-07-06  5:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03  3:21 [PATCH] selftests/futex_requeue: Increase futex timeout to cover slow hardware Feng Tang
2026-07-05 20:04 ` Thomas Gleixner
2026-07-06  5:34   ` Feng Tang

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