Re: [PATCH v6 0/2] selftests/futex: fix the failed futex_requeue test issue

From: Andrew Morton

Date: Fri May 08 2026 - 20:05:36 EST


On Wed, 6 May 2026 11:23:11 +0800 Yuwen Chen <ywen.chen@xxxxxxxxxxx> wrote:

> This test item has extremely high requirements for timing and can only
> pass the test under specific conditions. The following situations will
> lead to test failure:
>
> MainThread Thread1
> |
> pthread_create--------------------
> | |
> futex_cmp_requeue |
> | futex_wait
> | |
>
> If the child thread is not waiting in the futex_wait function when the
> main thread reaches the futex_cmp_requeue function, the test will fail.
>
> An attempt is made to avoid this problem by checking whether the child
> thread is in a sleeping state in the main thread.

Thanks. AI review has a bunch of questions:
https://sashiko.dev/#/patchset/tencent_D6D5FA3C2F6FE52BA6ABA1A88C1B6E1CC605@xxxxxx