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

* Re: [PATCH 5.15.y] selftests: arm64: signal: skip SVE VL change test with single VL
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-06-26 17:54 UTC (permalink / raw)
  To: stable, gregkh
  Cc: Sasha Levin, shuah, linux-kernel, will, catalin.marinas, broonie,
	linux-arm-kernel, linux-kselftest, cristian.marussi, Yijia Wang

> [PATCH 5.15.y] selftests: arm64: signal: skip SVE VL change test with single VL

Can we keep the commit message the same as upstream? Is there a reason to
rewrite it?

-- 
Thanks,
Sasha


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

* [PATCH v2 5.15.y] kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported
  2026-06-26 17:54 ` Sasha Levin
@ 2026-06-27  3:22   ` Yijia Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Yijia Wang @ 2026-06-27  3:22 UTC (permalink / raw)
  To: stable, sashal, gregkh
  Cc: andre.przywara, linux-kernel, cristian.marussi, will,
	catalin.marinas, broonie, shuah, linux-arm-kernel,
	linux-kselftest, Yijia Wang

[ Upstream commit 78c09c0f4df89fabdcfb3e5e53d3196cf67f64ef ]

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>
Signed-off-by: Yijia Wang <wangyijia.yeah@bytedance.com>
---
Changes in v2:
- Keep the commit message aligned with the upstream commit, as requested by
  Sasha.
- Link to v1:
  https://lore.kernel.org/r/20260626-b4-arm64-515-preview-clean-v1-1-ad19e286e322@bytedance.com

 .../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;
 	}
 
-- 
2.43.0


^ 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