<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/tools/testing/selftests/futex/functional, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-07-20T19:03:19+00:00</updated>
<entry>
<title>selftests/futex: Give circular-list nodes static storage</title>
<updated>2026-07-20T19:03:19+00:00</updated>
<author>
<name>Miles Krause</name>
<email>mileskrause5200@gmail.com</email>
</author>
<published>2026-07-12T02:47:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=d1c656df36d00aad9c810e563f918dbbaf41a7b9'/>
<id>urn:sha1:d1c656df36d00aad9c810e563f918dbbaf41a7b9</id>
<content type='text'>
The registered robust-list head has static storage but points at three
automatic lock nodes. GCC warns about storing the address of a local
variable in the static head when building the selftest with -Wall.

Give the nodes static storage as well. This keeps every object in the
circular list alive through child exit without changing the list topology.

Signed-off-by: Miles Krause &lt;mileskrause5200@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Link: https://patch.msgid.link/20260711-futex-robust-list-static-nodes-v1-1-723754d75cf5@gmail.com
</content>
</entry>
<entry>
<title>selftests/futex: Use thread synchronization helpers instead of usleep()</title>
<updated>2026-07-20T18:58:51+00:00</updated>
<author>
<name>Yuwen Chen</name>
<email>ywen.chen@foxmail.com</email>
</author>
<published>2026-05-18T02:16:54+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=23dd3f884926d945c1f6a7510f5b95164f2906e2'/>
<id>urn:sha1:23dd3f884926d945c1f6a7510f5b95164f2906e2</id>
<content type='text'>
This test uses usleep() to delay the main thread after creating the test
thread[s] under the assumption that they already are blocked on the futex
when the main thread continues.

That "works" on otherwise idle systems, but fails under load resulting in
failed selftests because the requeue operation starts before the waiters
reached the kernel.

Replace the usleep() waits by the new thread synchronization helpers to cure that.

[ tglx: Adapted to test harness changes, fixed coding style, sanitized the
	timeout handling and rewrote change log.

Co-developed-by: Edward Liaw &lt;edliaw@google.com&gt;
Signed-off-by: Yuwen Chen &lt;ywen.chen@foxmail.com&gt;
Signed-off-by: Edward Liaw &lt;edliaw@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/tencent_76B9DE9C9FE5C57F6D74B5149970DF8CCF0A@qq.com
</content>
</entry>
<entry>
<title>selftests/futex: Provide thread creation and synchronization helpers</title>
<updated>2026-07-20T18:58:51+00:00</updated>
<author>
<name>Yuwen Chen</name>
<email>ywen.chen@foxmail.com</email>
</author>
<published>2026-05-18T02:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/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>
<entry>
<title>selftests/futex: Dynamically skip unsupported tests</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Wake Liu</name>
<email>wakel@google.com</email>
</author>
<published>2026-06-24T07:02:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=50c121e5a57abe446e46825fb9c69ac419765d5c'/>
<id>urn:sha1:50c121e5a57abe446e46825fb9c69ac419765d5c</id>
<content type='text'>
Some new futex tests rely on kernel features that may not be supported
on all configurations (e.g., FUTEX2_NUMA or PR_FUTEX_HASH).
Currently, these tests fail with EINVAL when the features are missing.

Add dynamic skip logic to:

 - futex_priv_hash: Skip if PR_FUTEX_HASH returns ENOSYS or EINVAL.

 - futex_numa_mpol: Skip if futex2 or FUTEX2_NUMA returns ENOSYS or EINVAL.

This allows the tests to pass (as SKIPPED) on kernels without support,
while preserving coverage on configurations that do support them.

[ tglx: Adapt to harness changes, massage change log ]

Signed-off-by: Wake Liu &lt;wakel@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260624070223.1533167-1-wakel@google.com
</content>
</entry>
<entry>
<title>selftests/futex: Add FUTEX_LOCK_PI owner-exiting coverage</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Valery Borovsky</name>
<email>vebohr@gmail.com</email>
</author>
<published>2026-06-07T18:32:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=90a0286c7d3591295a55c97319de322159993c21'/>
<id>urn:sha1:90a0286c7d3591295a55c97319de322159993c21</id>
<content type='text'>
The futex functional tests cover FUTEX_LOCK_PI timeout semantics
(futex_wait_timeout.c) and robust-list owner death (robust_list.c), but
nothing exercises a non-robust PI owner exiting while holding the lock,
nor the basic ownership / EDEADLK / unlock word semantics of
FUTEX_LOCK_PI.

Add futex_lock_pi_exiting.c with three tests:

 - lock_unlock_basic: an uncontended FUTEX_LOCK_PI puts the owner TID in
   the futex word, a recursive lock by the owner returns EDEADLK, and
   FUTEX_UNLOCK_PI clears the word.

 - owner_dies_with_blocked_waiter: a thread acquires a PI futex and exits
   while holding it; a blocked FUTEX_LOCK_PI waiter must come out cleanly
   (0, EOWNERDEAD or ESRCH) and own the lock when it acquires.

 - stress_owner_exits: repeatedly drive the same exiting-owner path.

The exiting-owner retry path is where commit 210d36d892de ("futex: Clear
stale exiting pointer in futex_lock_pi() retry path") fixed a stale task
pointer that tripped WARN_ON_ONCE() in wait_for_owner_exiting(). That
warning does not change the syscall return value, so this test does not
assert on it directly; the stress loop exists to give a kernel booted
with panic_on_warn=1 (as fuzzers and CI commonly run) a chance to trip
on it.

Signed-off-by: Valery Borovsky &lt;vebohr@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260607183249.246037-1-vebohr@gmail.com
</content>
</entry>
<entry>
<title>selftests/futex: Migrate robust_list to harness</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Wake Liu</name>
<email>wakel@google.com</email>
</author>
<published>2026-06-01T06:51:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=553bd67a903273d94030f32d671f3d6f19860a85'/>
<id>urn:sha1:553bd67a903273d94030f32d671f3d6f19860a85</id>
<content type='text'>
Migrate robust_list test to the kselftest harness framework, removing mixed
legacy ksft_* API usages and passing test metadata to cloned child
functions via child_args struct.

Also, fix an out-of-bounds waitpid bug during multithreaded tests.

[ tglx: Fixup coding style ]

Signed-off-by: Wake Liu &lt;wakel@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260601065126.3623867-8-wakel@google.com
</content>
</entry>
<entry>
<title>selftests/futex: Migrate futex_priv_hash to harness</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Wake Liu</name>
<email>wakel@google.com</email>
</author>
<published>2026-06-01T06:51:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=4f22ba7eee3e1ed67095edd49fb99db4032343ab'/>
<id>urn:sha1:4f22ba7eee3e1ed67095edd49fb99db4032343ab</id>
<content type='text'>
Migrate futex_priv_hash test to the kselftest harness framework, removing
mixed legacy ksft_* API usages and passing test metadata to all helper
functions.

[ tglx: Fixup coding style ]

Signed-off-by: Wake Liu &lt;wakel@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260601065126.3623867-7-wakel@google.com
</content>
</entry>
<entry>
<title>selftests/futex: Migrate futex_numa_mpol to harness</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Wake Liu</name>
<email>wakel@google.com</email>
</author>
<published>2026-06-01T06:51:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=9b19fbb3a6c5e5fd4e7b14daa53510f6dc72d4d4'/>
<id>urn:sha1:9b19fbb3a6c5e5fd4e7b14daa53510f6dc72d4d4</id>
<content type='text'>
Migrate futex_numa_mpol test to the kselftest harness framework, removing
mixed legacy ksft_* API usages and passing test metadata to helper
functions.

[ tglx: Fixup coding style ]

Signed-off-by: Wake Liu &lt;wakel@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260601065126.3623867-6-wakel@google.com
</content>
</entry>
<entry>
<title>selftests/futex: Migrate futex_requeue_pi_signal_restart to harness</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Wake Liu</name>
<email>wakel@google.com</email>
</author>
<published>2026-06-01T06:51:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=7fe733f11215ac7eb308ad2e57a2b2279ce9f303'/>
<id>urn:sha1:7fe733f11215ac7eb308ad2e57a2b2279ce9f303</id>
<content type='text'>
Migrate futex_requeue_pi_signal_restart test to the kselftest harness
framework, removing mixed legacy ksft_* API usages and ensuring proper
thread joining.

[ tglx: Fixup coding style ]

Signed-off-by: Wake Liu &lt;wakel@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260601065126.3623867-5-wakel@google.com
</content>
</entry>
<entry>
<title>selftests/futex: Migrate futex_requeue_pi_mismatched_ops to harness</title>
<updated>2026-07-05T19:49:18+00:00</updated>
<author>
<name>Wake Liu</name>
<email>wakel@google.com</email>
</author>
<published>2026-06-01T06:51:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=4559deb7382861b5e920bbccdf62c470384ab0ac'/>
<id>urn:sha1:4559deb7382861b5e920bbccdf62c470384ab0ac</id>
<content type='text'>
Migrate futex_requeue_pi_mismatched_ops test to the kselftest harness
framework, removing mixed legacy ksft_* API usages and passing test
metadata to helper thread.

[ tglx: Fixup coding style ]

Signed-off-by: Wake Liu &lt;wakel@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260601065126.3623867-4-wakel@google.com
</content>
</entry>
</feed>
