<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/tools/testing/selftests/futex/include/futex_thread.h, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/futex/include/futex_thread.h?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/futex/include/futex_thread.h?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-07-20T18:58:51Z</updated>
<entry>
<title>selftests/futex: Provide thread creation and synchronization helpers</title>
<updated>2026-07-20T18:58:51Z</updated>
<author>
<name>Yuwen Chen</name>
<email>ywen.chen@foxmail.com</email>
</author>
<published>2026-05-18T02:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6c4a1b972643d72bd26f674677df8b5a6a3fe94f'/>
<id>urn:sha1:6c4a1b972643d72bd26f674677df8b5a6a3fe94f</id>
<content type='text'>
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 &lt;ywen.chen@foxmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/tencent_4C90BE98BBC48B38B9FBC6A95C45CF49F309@qq.com
</content>
</entry>
</feed>
