Thread (13 messages) read the whole thread 13 messages, 2 authors, 2026-02-25

Re: [PATCH 1/2] selftests/harness: fix XFAIL_ADD matching when test metadata is not initialized

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-24 01:22:16
Also in: linux-kselftest, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help