Skip to content

Commit 0e3dbf7

Browse files
cris-mactmarinas
authored andcommitted
kselftest/arm64: signal: Skip tests if required features are missing
During initialization of a signal testcase, features declared as required are properly checked against the running system but no action is then taken to effectively skip such a testcase. Fix core signals test logic to abort initialization and report such a testcase as skipped to the KSelfTest framework. Fixes: f96bf43 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils") Signed-off-by: Cristian Marussi <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 59a68d4 commit 0e3dbf7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/testing/selftests/arm64/signal/test_signals_utils.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,19 @@ int test_init(struct tdescr *td)
266266
td->feats_supported |= FEAT_SSBS;
267267
if (getauxval(AT_HWCAP) & HWCAP_SVE)
268268
td->feats_supported |= FEAT_SVE;
269-
if (feats_ok(td))
269+
if (feats_ok(td)) {
270270
fprintf(stderr,
271271
"Required Features: [%s] supported\n",
272272
feats_to_string(td->feats_required &
273273
td->feats_supported));
274-
else
274+
} else {
275275
fprintf(stderr,
276276
"Required Features: [%s] NOT supported\n",
277277
feats_to_string(td->feats_required &
278278
~td->feats_supported));
279+
td->result = KSFT_SKIP;
280+
return 0;
281+
}
279282
}
280283

281284
/* Perform test specific additional initialization */

0 commit comments

Comments
 (0)