selftests/arm64: signal: fix inverted feature mask in diagnostics
PATCH 1/1 selftests/arm64: signal: fix inverted feature mask in diagnostics
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
--- tools/testing/selftests/arm64/signal/test_signals_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/arm64/signal/test_signals_utils.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Quoted 9 lines · Long Wei
When a testcase is skipped because an incompatible CPU feature is present,
test_init()reports the feature set with:
feats_incompatible& ~feats_supportedThat 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.
Looks like a cut'n'paste error.