public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Sun Jian <sun.jian.kdev@gmail.com>
Cc: shuah@kernel.org, linux-kselftest@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com, edumazet@google.com,
	horms@kernel.org, kees@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] selftests/harness: fix XFAIL_ADD matching when test metadata is not initialized
Date: Mon, 23 Feb 2026 17:22:14 -0800	[thread overview]
Message-ID: <20260223172214.5d8ddaa1@kernel.org> (raw)
In-Reply-To: <20260222111847.692325-1-sun.jian.kdev@gmail.com>

On Sun, 22 Feb 2026 19:18:46 +0800 Sun Jian wrote:
> XFAIL_ADD() registers expected failures using constructor order, but the
> associated struct __test_metadata pointer may not be initialized yet.
> As a result, xfail entries can end up with a NULL test pointer and never
> match at runtime, causing expected failures to be reported as FAIL.
> 
> Store the test case name in the xfail entry and fall back to name-based
> matching when the test pointer is unavailable, while keeping the original
> pointer-based matching for compatibility.

This looks a bit inelegant, what compiler is this failing on for you?

Constructors seem to have a concept of priority so if we have to,
we should probably used those for the fix.
-- 
pw-bot: cr

  parent reply	other threads:[~2026-02-24  1:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-22 11:18 [PATCH 1/2] selftests/harness: fix XFAIL_ADD matching when test metadata is not initialized Sun Jian
2026-02-22 11:18 ` [PATCH 2/2] selftests: net: tun: don't abort XFAIL cases Sun Jian
2026-02-24  1:22 ` Jakub Kicinski [this message]
2026-02-24  2:43   ` [PATCH 1/2] selftests/harness: fix XFAIL_ADD matching when test metadata is not initialized sun jian
2026-02-24  2:53     ` Jakub Kicinski
2026-02-24  5:01       ` sun jian
2026-02-24  8:05         ` sun jian
2026-02-24 10:44 ` [PATCH 1/2] selftests/harness: order TEST_F and XFAIL_ADD constructors Sun Jian
2026-02-24 10:44   ` [PATCH 2/2] selftests: net: tun: don't abort XFAIL cases Sun Jian
2026-02-24 11:38 ` [PATCH v2 1/2] selftests/harness: order TEST_F and XFAIL_ADD constructors Sun Jian
2026-02-24 11:39   ` [PATCH v2 2/2] selftests: net: tun: don't abort XFAIL cases Sun Jian
2026-02-24 23:44   ` [PATCH v2 1/2] selftests/harness: order TEST_F and XFAIL_ADD constructors Jakub Kicinski
2026-02-25  2:10     ` 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=20260223172214.5d8ddaa1@kernel.org \
    --to=kuba@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox