Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.15.y] selftests: arm64: signal: skip SVE VL change test with single VL
@ 2026-06-26 12:59 Yijia Wang
  2026-06-26 17:54 ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Yijia Wang @ 2026-06-26 12:59 UTC (permalink / raw)
  To: sashal, stable, gregkh
  Cc: shuah, linux-kernel, will, catalin.marinas, broonie,
	linux-arm-kernel, linux-kselftest, cristian.marussi, Yijia Wang

[ Upstream commit 78c09c0f4df89fabdcfb3e5e53d3196cf67f64ef ]

The fake_sigreturn_sve_change_vl test needs at least two SVE vector
lengths so it can attempt to modify the VL in a signal frame.  On systems
that support SVE but expose only one VL, the test initialization returns
false and the signal test harness reports the case as a failure.

Mark the testcase result as KSFT_SKIP before returning false when fewer
than two VLs are available.  This preserves the old bool init callback
contract while reporting the unsupported configuration correctly.

This is a minimal backport of the behavior used by newer selftests, where
the same single-VL configuration is reported as SKIP instead of FAIL.  The
5.15.y selftest still uses a bool init callback here, so keep returning
false after setting td->result to KSFT_SKIP.

Signed-off-by: Yijia Wang <wangyijia.yeah@bytedance.com>
---
 .../selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c     | 2 ++
 1 file changed, 2 insertions(+)

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 bb50b5adb..915821375 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;
 	}
 

---
base-commit: eceeec79dbc646d6dace49ed1ba2f656683d5537
change-id: 20260626-b4-arm64-515-preview-clean-9408c3dbd320

Best regards,
-- 
Yijia Wang <wangyijia.yeah@bytedance.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-27  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26 12:59 [PATCH 5.15.y] selftests: arm64: signal: skip SVE VL change test with single VL Yijia Wang
2026-06-26 17:54 ` Sasha Levin
2026-06-27  3:22   ` [PATCH v2 5.15.y] kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported Yijia Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox