From: Carlos Llamas <cmllamas@google.com>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: Wake Liu <wakel@google.com>,
tglx@kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, peterz@infradead.org,
dvhart@infradead.org, dave@stgolabs.net, shuah@kernel.org,
mingo@redhat.com
Subject: Re: [PATCH] selftests: futex: Restore support checks for futex2 and priv_hash
Date: Wed, 22 Jul 2026 16:51:56 +0000 [thread overview]
Message-ID: <amD1LPWCvNNrYdQs@google.com> (raw)
In-Reply-To: <dca6abef-0f6c-414d-b7b5-02e5b2a355e3@igalia.com>
On Wed, Jul 22, 2026 at 12:20:37PM -0300, André Almeida wrote:
> Hi Wake,
>
> Em 22/07/2026 04:08, Wake Liu escreveu:
> > Older kernels may not support FUTEX2 syscalls or PR_FUTEX_HASH.
> > Removing these checks causes false failures when running the tests on
> > such kernels. Restore the checks so the tests can be gracefully
> > skipped when the features are not supported.
> >
> > Signed-off-by: Wake Liu <wakel@google.com>
> > ---
> > tools/testing/selftests/futex/functional/futex_numa_mpol.c | 2 ++
> > tools/testing/selftests/futex/functional/futex_priv_hash.c | 2 ++
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/tools/testing/selftests/futex/functional/futex_numa_mpol.c b/tools/testing/selftests/futex/functional/futex_numa_mpol.c
> > index 78c0f7a59e17..d215acf88120 100644
> > --- a/tools/testing/selftests/futex/functional/futex_numa_mpol.c
> > +++ b/tools/testing/selftests/futex/functional/futex_numa_mpol.c
> > @@ -103,6 +103,8 @@ static void __test_futex(void *futex_ptr, int err_value, unsigned int futex_flag
> > break;
> > }
> > if (ret < 0) {
> > + if (errno == ENOSYS || (errno == EINVAL && (futex_flags & FUTEX2_NUMA)))
> > + ksft_exit_skip("futex2 or FUTEX2_NUMA not supported by kernel\n");
>
> Why aren't you using SKIP() instead of ksft_exit_skip() like how you have
> done at
>
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=locking/futex&id=50c121e5a57abe446e46825fb9c69ac419765d5c
It's actually the same patch. See:
https://lore.kernel.org/all/20260624070223.1533167-1-wakel@google.com/
Thomas, just refactored it to use the harness API.
I'm not sure why Wake sent the same fix twice but it was likely by
mistake. That's all, nothing to see here.
--
Carlos Llamas
next prev parent reply other threads:[~2026-07-22 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 7:08 [PATCH] selftests: futex: Restore support checks for futex2 and priv_hash Wake Liu
2026-07-22 15:20 ` André Almeida
2026-07-22 16:51 ` Carlos Llamas [this message]
2026-07-23 0:27 ` Wake Liu
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=amD1LPWCvNNrYdQs@google.com \
--to=cmllamas@google.com \
--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=tglx@kernel.org \
--cc=wakel@google.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.