From: Thomas Gleixner <tglx@kernel.org>
To: Lei Zhu <zhulei_szu@163.com>,
mingo@redhat.com, peterz@infradead.org, dvhart@infradead.org,
dave@stgolabs.net, andrealmeid@igalia.com, shuah@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
zhulei_szu@163.com
Subject: Re: [PATCH] selftests/futex: Correct pthread_create return value check
Date: Mon, 10 Aug 2026 16:32:58 +0200 [thread overview]
Message-ID: <87mruum4f9.ffs@fw13> (raw)
In-Reply-To: <20260727030832.118316-1-zhulei_szu@163.com>
On Mon, Jul 27 2026 at 11:08, Lei Zhu wrote:
> From: Lei Zhu <zhulei@kylinos.cn>
>
> The pthread_create() functions returns 0 on success and a positive value on
> failure. Modify the return value check to correctly detect failure cases.
>
> Fixes: 14d016bd7282 ("selftests/futex: Refactor futex_wait_private_mapped_file with kselftest_harness.h")
> Signed-off-by: Lei Zhu <zhulei@kylinos.cn>
> ---
> .../selftests/futex/functional/futex_wait_private_mapped_file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c b/tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c
> index 2a749f9b14eb..e6266c8a357e 100644
> --- a/tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c
> +++ b/tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c
> @@ -62,7 +62,7 @@ TEST(wait_private_mapped_file)
> int res;
>
> res = pthread_create(&thr, NULL, thr_futex_wait, NULL);
> - if (res < 0)
> + if (res)
> ksft_exit_fail_msg("pthread_create error\n");
That does not apply on the locking/futex branch of the tip tree. It's
fixed already.
Thanks,
tglx
prev parent reply other threads:[~2026-08-10 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 3:08 [PATCH] selftests/futex: Correct pthread_create return value check Lei Zhu
2026-08-03 14:54 ` André Almeida
2026-08-10 14:32 ` Thomas Gleixner [this message]
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=87mruum4f9.ffs@fw13 \
--to=tglx@kernel.org \
--cc=andrealmeid@igalia.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=zhulei_szu@163.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.