LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kselftest/arm64: signal: Skip tests if required features are missing
@ 2021-09-20 12:12 Cristian Marussi
2021-09-20 12:22 ` Mark Brown
2021-09-21 17:12 ` Catalin Marinas
0 siblings, 2 replies; 5+ messages in thread
From: Cristian Marussi @ 2021-09-20 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kselftest, linux-kernel
Cc: Catalin Marinas, Mark Brown, cristian.marussi
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: f96bf4340316 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
As a consequence KSelfTest TAP results will now report this when a signal-SVE
testcase run on a system missing SVE:
\# selftests: arm64: fake_sigreturn_sve_change_vl
\# Registered handlers for all signals.
\# Detected MINSTKSIGSZ:4720
\# Required Features: [ SVE ] NOT supported
\# ==>> completed. SKIP.
\# # FAKE_SIGRETURN_SVE_CHANGE :: Attempt to change SVE VL
\# ok 7 selftests: arm64: fake_sigreturn_sve_change_vl # SKIP
---
tools/testing/selftests/arm64/signal/test_signals_utils.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.c b/tools/testing/selftests/arm64/signal/test_signals_utils.c
index 6836510a522f..22722abc9dfa 100644
--- a/tools/testing/selftests/arm64/signal/test_signals_utils.c
+++ b/tools/testing/selftests/arm64/signal/test_signals_utils.c
@@ -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 */
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: signal: Skip tests if required features are missing
2021-09-20 12:12 [PATCH] kselftest/arm64: signal: Skip tests if required features are missing Cristian Marussi
@ 2021-09-20 12:22 ` Mark Brown
2021-09-20 12:30 ` Cristian Marussi
2021-09-21 17:12 ` Catalin Marinas
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2021-09-20 12:22 UTC (permalink / raw)
To: Cristian Marussi
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Catalin Marinas
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
On Mon, Sep 20, 2021 at 01:12:28PM +0100, Cristian Marussi wrote:
> 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.
Reviwed-by: Mark Brown <broonie@kernel.org>
I have a version of this locally which I thought I'd sent out already
among all the in flight patches I've got for kseltest but it looks like
it didn't make it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: signal: Skip tests if required features are missing
2021-09-20 12:22 ` Mark Brown
@ 2021-09-20 12:30 ` Cristian Marussi
2021-09-20 12:31 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Cristian Marussi @ 2021-09-20 12:30 UTC (permalink / raw)
To: Mark Brown
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Catalin Marinas
On Mon, Sep 20, 2021 at 01:22:40PM +0100, Mark Brown wrote:
> On Mon, Sep 20, 2021 at 01:12:28PM +0100, Cristian Marussi wrote:
> > 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.
>
> Reviwed-by: Mark Brown <broonie@kernel.org>
>
> I have a version of this locally which I thought I'd sent out already
> among all the in flight patches I've got for kseltest but it looks like
> it didn't make it.
Ah ok sorry, I did not know. Pick either as you wish.
Thanks,
Cristian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: signal: Skip tests if required features are missing
2021-09-20 12:30 ` Cristian Marussi
@ 2021-09-20 12:31 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-09-20 12:31 UTC (permalink / raw)
To: Cristian Marussi
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Catalin Marinas
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
On Mon, Sep 20, 2021 at 01:30:14PM +0100, Cristian Marussi wrote:
> On Mon, Sep 20, 2021 at 01:22:40PM +0100, Mark Brown wrote:
> > On Mon, Sep 20, 2021 at 01:12:28PM +0100, Cristian Marussi wrote:
> > > 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.
> > Reviwed-by: Mark Brown <broonie@kernel.org>
> > I have a version of this locally which I thought I'd sent out already
> > among all the in flight patches I've got for kseltest but it looks like
> > it didn't make it.
> Ah ok sorry, I did not know. Pick either as you wish.
No, please use this one - like I say I thought I'd sent mine out but it
looks like I didn't.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kselftest/arm64: signal: Skip tests if required features are missing
2021-09-20 12:12 [PATCH] kselftest/arm64: signal: Skip tests if required features are missing Cristian Marussi
2021-09-20 12:22 ` Mark Brown
@ 2021-09-21 17:12 ` Catalin Marinas
1 sibling, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2021-09-21 17:12 UTC (permalink / raw)
To: linux-kselftest, Cristian Marussi, linux-kernel, linux-arm-kernel
Cc: Will Deacon, Mark Brown
On Mon, 20 Sep 2021 13:12:28 +0100, Cristian Marussi wrote:
> 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.
Applied to arm64 (for-next/fixes), thanks!
[1/1] kselftest/arm64: signal: Skip tests if required features are missing
https://git.kernel.org/arm64/c/0e3dbf765fe2
--
Catalin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-21 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 12:12 [PATCH] kselftest/arm64: signal: Skip tests if required features are missing Cristian Marussi
2021-09-20 12:22 ` Mark Brown
2021-09-20 12:30 ` Cristian Marussi
2021-09-20 12:31 ` Mark Brown
2021-09-21 17:12 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).