All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Yuwen Chen <ywen.chen@foxmail.com>, ywen.chen@foxmail.com
Cc: akpm@linux-foundation.org, andrealmeid@igalia.com,
	bigeasy@linutronix.de, colin.i.king@gmail.com, dave@stgolabs.net,
	dvhart@infradead.org, justinstitt@google.com,
	kernel-team@android.com, licayy@foxmail.com,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	luto@mit.edu, mingo@redhat.com, morbo@google.com,
	nathan@kernel.org, peterz@infradead.org, shuah@kernel.org,
	usama.anjum@collabora.com, wakel@google.com
Subject: Re: [PATCH v5 2/2] selftests/futex: fix the failed futex_requeue test issue
Date: Fri, 13 Feb 2026 09:25:36 +0100	[thread overview]
Message-ID: <87ikc182yn.ffs@tglx> (raw)
In-Reply-To: <tencent_7F45D13FB7CF789CEBCCF945DEF897481706@qq.com>

On Thu, Feb 05 2026 at 10:09, Yuwen Chen wrote:
>  TEST(requeue_single)
>  {
> +	struct futex_thread waiter;
>  	volatile futex_t _f1 = 0;
>  	volatile futex_t f2 = 0;
> -	pthread_t waiter[10];
>  
>  	f1 = &_f1;
>  
>  	/*
>  	 * Requeue a waiter from f1 to f2, and wake f2.
>  	 */
> -	ASSERT_EQ(0, pthread_create(&waiter[0], NULL, waiterfn, NULL));
> -
> -	usleep(WAKE_WAIT_US);
> +	ASSERT_EQ(0, futex_thread_create(&waiter, waiterfn, NULL));
> +	futex_wait_for_thread(&waiter);

This is a horrible hack. If that wait fails, there is no point to
continue.


  reply	other threads:[~2026-02-13  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05  2:00 [PATCH v5 0/2] selftests/futex: fix the failed futex_requeue test Yuwen Chen
2026-02-05  2:08 ` [PATCH v5 1/2] selftests/futex: implement the interfaces related to threads Yuwen Chen
2026-02-13  8:23   ` Thomas Gleixner
2026-02-27  8:53     ` Yuwen Chen
2026-02-05  2:09 ` [PATCH v5 2/2] selftests/futex: fix the failed futex_requeue test issue Yuwen Chen
2026-02-13  8:25   ` Thomas Gleixner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-02-05  2:05 Yuwen Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikc182yn.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andrealmeid@igalia.com \
    --cc=bigeasy@linutronix.de \
    --cc=colin.i.king@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=justinstitt@google.com \
    --cc=kernel-team@android.com \
    --cc=licayy@foxmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@mit.edu \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=usama.anjum@collabora.com \
    --cc=wakel@google.com \
    --cc=ywen.chen@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.