]> git.baikalelectronics.ru Git - kernel.git/commitdiff
kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported
authorCristian Marussi <cristian.marussi@arm.com>
Tue, 24 May 2022 10:31:49 +0000 (11:31 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 2 Jun 2022 19:29:17 +0000 (20:29 +0100)
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>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220524103149.2802-1-cristian.marussi@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c

index bb50b5adbf10dee3242c95b71f67724469541672..915821375b0a44bc5209def4c26f8c513cb614a1 100644 (file)
@@ -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;
        }