[PATCH] selftests/arm64: signal: fix inverted feature mask in diagnostics

Long Wei longwei27 at huawei.com
Sat Nov 14 00:10:13 PST 2026


When a testcase is skipped because an incompatible CPU feature is
present, test_init() reports the feature set with:

        feats_incompatible & ~feats_supported

That is the set of incompatible features which are *not* supported,
i.e. always empty, instead of the incompatible features which actually
triggered the skip.  As a result the diagnostic prints an empty list and
gives no hint about why the test was skipped.

Use the supported set so the offending feature is reported:

        feats_incompatible & feats_supported

Fixes: 32de73e89099 ("kselftest/arm64: signal: Allow tests to be incompatible with features")
Signed-off-by: Long Wei <longwei27 at huawei.com>
---
 tools/testing/selftests/arm64/signal/test_signals_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.c b/tools/testing/selftests/arm64/signal/test_signals_utils.c
index 4b12dbd7669d..16036e06d6c1 100644
--- a/tools/testing/selftests/arm64/signal/test_signals_utils.c
+++ b/tools/testing/selftests/arm64/signal/test_signals_utils.c
@@ -365,7 +365,7 @@ int test_init(struct tdescr *td)
 				fprintf(stderr,
 					"Incompatible Features: [%s] supported\n",
 					feats_to_string(td->feats_incompatible &
-							~td->feats_supported));
+							td->feats_supported));
 
 
 			td->result = KSFT_SKIP;
-- 
2.43.0




More information about the linux-arm-kernel mailing list