From: Jakub Kicinski <kuba@kernel.org>
To: Shuah Khan <shuah@kernel.org>
Cc: Sun Jian <sun.jian.kdev@gmail.com>,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Kees Cook <kees@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH v3 v3 1/2] selftests/harness: order TEST_F and XFAIL_ADD constructors
Date: Wed, 25 Feb 2026 19:53:15 -0800 [thread overview]
Message-ID: <20260225195315.122772f4@kernel.org> (raw)
In-Reply-To: <20260225111451.347923-1-sun.jian.kdev@gmail.com>
On Wed, 25 Feb 2026 19:14:50 +0800 Sun Jian wrote:
> TEST_F() allocates and registers its struct __test_metadata via mmap()
> inside its constructor, and only then assigns the
> _##fixture_##test##_object pointer.
>
> XFAIL_ADD() runs in a constructor too and reads
> _##fixture_##test##_object to initialize xfail->test. If XFAIL_ADD runs
> first, xfail->test can be NULL and the expected failure will be reported
> as FAIL.
>
> Use constructor priorities to ensure TEST_F registration runs before
> XFAIL_ADD, without adding extra state or runtime lookups.
>
> Fixes: 2709473c9386 ("selftests: kselftest_harness: support using xfail")
> Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
Hi Shuah!
Any preference which one of us takes this series?
No real preference here, just slight preference to ship it as
a fix to 7.0 rather than via -next.
next prev parent reply other threads:[~2026-02-26 3:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 11:14 [PATCH v3 v3 1/2] selftests/harness: order TEST_F and XFAIL_ADD constructors Sun Jian
2026-02-26 3:53 ` Jakub Kicinski [this message]
2026-03-05 8:46 ` [v3,v3,1/2] " Paolo Abeni
2026-03-05 9:09 ` [PATCH v3 v3 1/2] " Thomas Weißschuh
2026-03-05 16:00 ` patchwork-bot+netdevbpf
2026-03-06 2:47 ` sun jian
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=20260225195315.122772f4@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=sun.jian.kdev@gmail.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.