linux/tools/testing/selftests/futex/include
Yuwen Chen 6c4a1b9726 selftests/futex: Provide thread creation and synchronization helpers
There are timing issues in the use of threads in some selftests for futexes
as the tests rely on timed waits to ensure that the other test thread[s]
reached the lock wait function in the kernel.

That "works" on halfways idle systems, but fails under load which results
in tests failing.

Provide a set of helper functions to create test threads and to wait for
them to reach the lock wait by monitoring /proc/$PID/wchan.

[ tglx: Fixup coding style, move the timeout into the helper, adapt to test
  	harness changes and massage change log ]

Signed-off-by: Yuwen Chen <ywen.chen@foxmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/tencent_4C90BE98BBC48B38B9FBC6A95C45CF49F309@qq.com
2026-07-20 20:58:51 +02:00
..
atomic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
futex_thread.h selftests/futex: Provide thread creation and synchronization helpers 2026-07-20 20:58:51 +02:00
futex2test.h selftests/futex: Migrate functional tests to harness 2026-07-05 21:49:17 +02:00
futextest.h selftests: futex: Add tests for robust release operations 2026-06-03 11:38:53 +02:00