diff mbox series

kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported

Message ID 20220524103149.2802-1-cristian.marussi@arm.com (mailing list archive)
State New, archived
Headers show
Series kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported | expand

Commit Message

Cristian Marussi May 24, 2022, 10:31 a.m. UTC
On platform where SVE is supported but there are less than 2 VLs available
the signal SVE change test should be skipped instead of failing.

Reported-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 .../arm64/signal/testcases/fake_sigreturn_sve_change_vl.c       | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown May 24, 2022, 10:43 a.m. UTC | #1
On Tue, May 24, 2022 at 11:31:49AM +0100, Cristian Marussi wrote:
> On platform where SVE is supported but there are less than 2 VLs available
> the signal SVE change test should be skipped instead of failing.

Reviewed-by: Mark Brown <broonie@kernel.org>
Catalin Marinas June 2, 2022, 7:41 p.m. UTC | #2
On Tue, 24 May 2022 11:31:49 +0100, Cristian Marussi wrote:
> On platform where SVE is supported but there are less than 2 VLs available
> the signal SVE change test should be skipped instead of failing.
> 
> 

Applied to arm64 (for-next/core), thanks!

[1/1] kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported
      https://git.kernel.org/arm64/c/78c09c0f4df8
diff mbox series

Patch

diff --git a/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c b/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c
index bb50b5adbf10..915821375b0a 100644
--- a/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c
+++ b/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c
@@ -6,6 +6,7 @@ 
  * supported and is expected to segfault.
  */
 
+#include <kselftest.h>
 #include <signal.h>
 #include <ucontext.h>
 #include <sys/prctl.h>
@@ -40,6 +41,7 @@  static bool sve_get_vls(struct tdescr *td)
 	/* We need at least two VLs */
 	if (nvls < 2) {
 		fprintf(stderr, "Only %d VL supported\n", nvls);
+		td->result = KSFT_SKIP;
 		return false;
 	}