Commit 0e3dbf76 authored by Cristian Marussi's avatar Cristian Marussi Committed by Catalin Marinas

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: f96bf434 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils")
Signed-off-by: default avatarCristian Marussi <cristian.marussi@arm.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920121228.35368-1-cristian.marussi@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 59a68d41
......@@ -266,16 +266,19 @@ int test_init(struct tdescr *td)
td->feats_supported |= FEAT_SSBS;
if (getauxval(AT_HWCAP) & HWCAP_SVE)
td->feats_supported |= FEAT_SVE;
if (feats_ok(td))
if (feats_ok(td)) {
fprintf(stderr,
"Required Features: [%s] supported\n",
feats_to_string(td->feats_required &
td->feats_supported));
else
} else {
fprintf(stderr,
"Required Features: [%s] NOT supported\n",
feats_to_string(td->feats_required &
~td->feats_supported));
td->result = KSFT_SKIP;
return 0;
}
}
/* Perform test specific additional initialization */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment