[PATCH 0/7] selftests/futex: Migrate requeue, NUMA and robust list tests to harness

Wake Liu posted 7 patches 6 days, 22 hours ago
.../futex/functional/futex_numa_mpol.c        | 109 ++++++------
.../futex/functional/futex_priv_hash.c        | 160 ++++++++---------
.../futex/functional/futex_requeue.c          |  32 +++-
.../futex/functional/futex_requeue_pi.c       | 130 +++++++-------
.../futex_requeue_pi_mismatched_ops.c         |  39 ++--
.../futex_requeue_pi_signal_restart.c         |  67 ++++---
.../selftests/futex/functional/robust_list.c  | 166 +++++++++---------
7 files changed, 354 insertions(+), 349 deletions(-)
[PATCH 0/7] selftests/futex: Migrate requeue, NUMA and robust list tests to harness
Posted by Wake Liu 6 days, 22 hours ago
This series refactors the requeue, NUMA, and robust list futex functional
tests to exclusively use the kselftest_harness.h framework, completing
the remaining unsent functional test migrations in this directory.

This eliminates mixed usage of legacy ksft_* APIs and high-level harness
asserts, preventing crashes on older kernels, and ensures proper thread
joining.

For context, the previous wait-related migrations are in these states:
- Series 1 v2 (wait_timeout, wait_wouldblock, waitv): Sent, awaiting review.
  Link: https://lore.kernel.org/linux-kselftest/20260526010635.23980-1-wakel@google.com/
- Series 2 v1 (wait, private_mapped, uninitialized_heap): Sent, discussion ongoing.
  Link: https://lore.kernel.org/linux-kselftest/20260525092002.3762888-1-wakel@google.com/

Descriptions of individual patches:
Patch 1-4: Migrate requeue, requeue_pi, mismatched_ops, and signal_restart tests.
Patch 5: Migrates futex_numa_mpol.
Patch 6: Migrates futex_priv_hash.
Patch 7: Migrates robust_list (and fixes an out-of-bounds waitpid bug).

Wake Liu (7):
  selftests/futex: Migrate futex_requeue to harness
  selftests/futex: Migrate futex_requeue_pi to harness
  selftests/futex: Migrate futex_requeue_pi_mismatched_ops to harness
  selftests/futex: Migrate futex_requeue_pi_signal_restart to harness
  selftests/futex: Migrate futex_numa_mpol to harness
  selftests/futex: Migrate futex_priv_hash to harness
  selftests/futex: Migrate robust_list to harness

 .../futex/functional/futex_numa_mpol.c        | 109 ++++++------
 .../futex/functional/futex_priv_hash.c        | 160 ++++++++---------
 .../futex/functional/futex_requeue.c          |  32 +++-
 .../futex/functional/futex_requeue_pi.c       | 130 +++++++-------
 .../futex_requeue_pi_mismatched_ops.c         |  39 ++--
 .../futex_requeue_pi_signal_restart.c         |  67 ++++---
 .../selftests/futex/functional/robust_list.c  | 166 +++++++++---------
 7 files changed, 354 insertions(+), 349 deletions(-)

-- 
2.54.0.823.g6e5bcc1fc9-goog
Re: [PATCH 0/7] selftests/futex: Migrate requeue, NUMA and robust list tests to harness
Posted by Peter Zijlstra 6 days, 21 hours ago
On Mon, Jun 01, 2026 at 06:51:19AM +0000, Wake Liu wrote:
> This series refactors the requeue, NUMA, and robust list futex functional
> tests to exclusively use the kselftest_harness.h framework, completing
> the remaining unsent functional test migrations in this directory.
> 
> This eliminates mixed usage of legacy ksft_* APIs and high-level harness
> asserts, preventing crashes on older kernels, and ensures proper thread
> joining.
> 
> For context, the previous wait-related migrations are in these states:
> - Series 1 v2 (wait_timeout, wait_wouldblock, waitv): Sent, awaiting review.
>   Link: https://lore.kernel.org/linux-kselftest/20260526010635.23980-1-wakel@google.com/
> - Series 2 v1 (wait, private_mapped, uninitialized_heap): Sent, discussion ongoing.
>   Link: https://lore.kernel.org/linux-kselftest/20260525092002.3762888-1-wakel@google.com/
> 
> Descriptions of individual patches:
> Patch 1-4: Migrate requeue, requeue_pi, mismatched_ops, and signal_restart tests.
> Patch 5: Migrates futex_numa_mpol.
> Patch 6: Migrates futex_priv_hash.
> Patch 7: Migrates robust_list (and fixes an out-of-bounds waitpid bug).

Does this affect being able to build tools/testing/selftests/futex/
without having to do the ludicrous batshit 'make headers' thing?

If I cannot build the futex selftests in a virgin tree, then they're
broken. The selftests maintainers have time and time again shown their
incompetence and I'm sick of it.
Re: [PATCH 0/7] selftests/futex: Migrate requeue, NUMA and robust list tests to harness
Posted by Wake Liu 4 days, 23 hours ago
On Mon, Jun 01, 2026 at 08:24:06AM +0000, Peter Zijlstra wrote:
> Does this affect being able to build tools/testing/selftests/futex/
> without having to do the ludicrous batshit 'make headers' thing?

No, this series does not affect the ability to build the futex selftests
without 'make headers'.

The refactoring only touches the test logic and assertions to use the
kselftest harness, and does not introduce any new UAPI header dependencies.
All recent futex/prctl UAPI definitions (like futex_waitv, FUTEX2_* flags,
and PR_FUTEX_HASH) are already guarded with fallback defines in futextest.h,
futex2test.h, and the test files themselves.

It compiles fine in a virgin tree using the host's system headers,
exactly as it did before.

> If I cannot build the futex selftests in a virgin tree, then they're
> broken. The selftests maintainers have time and time again shown their
> incompetence and I'm sick of it.



-- 
Best Regards,
Wake Liu