[PATCH v2 05/11] kselftest/arm64: Exit with an error code on data mismatches in fp-stress

From: Mark Brown

Date: Thu Nov 05 2026 - 09:15:51 EST


Several of the fp-stress test loads have blocks at the end of their barf
functions with a range of commented out options for how to exit the program
after logging an error. Comments indicate that these were intended to
interact with some long gone debugging code in the kernel. At the minute
the option selected by all the programs is to deliver a SIGABRT to
themselves but there is no need to do this over a normal exit with a non
zero status. In order to facilitate running as a simple bare metal KVM
guest replace these repeated blocks with calls to exit_error(), this
will integrate just as well with the fp-stress harness.

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
tools/testing/selftests/arm64/fp/sve-test.S | 19 +------------------
tools/testing/selftests/arm64/fp/za-test.S | 20 +-------------------
tools/testing/selftests/arm64/fp/zt-test.S | 20 +-------------------
3 files changed, 3 insertions(+), 56 deletions(-)

diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S
index 26efdbdd88f9..d2ed2a44bdb5 100644
--- a/tools/testing/selftests/arm64/fp/sve-test.S
+++ b/tools/testing/selftests/arm64/fp/sve-test.S
@@ -477,11 +477,6 @@ function _start
endfunction

function barf
-// fpsimd.c acitivty log dump hack
-// ldr w0, =0xdeadc0de
-// mov w8, #__NR_exit
-// svc #0
-// end hack
mov x10, x0 // expected data
mov x11, x1 // actual data
mov x12, x2 // data size
@@ -515,19 +510,7 @@ function barf
bl putdecn
#endif

- mov x8, #__NR_getpid
- svc #0
-// fpsimd.c acitivty log dump hack
-// ldr w0, =0xdeadc0de
-// mov w8, #__NR_exit
-// svc #0
-// ^ end of hack
- mov x1, #SIGABRT
- mov x8, #__NR_kill
- svc #0
-// mov x8, #__NR_exit
-// mov x1, #1
-// svc #0
+ b exit_error
endfunction

function vl_barf
diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S
index 7208bb2db9f1..e1ba559b66e9 100644
--- a/tools/testing/selftests/arm64/fp/za-test.S
+++ b/tools/testing/selftests/arm64/fp/za-test.S
@@ -291,12 +291,6 @@ function _start
endfunction

function barf
-// fpsimd.c acitivty log dump hack
-// ldr w0, =0xdeadc0de
-// mov w8, #__NR_exit
-// svc #0
-// end hack
-
mrs x13, S3_3_C4_C2_2

smstop
@@ -326,19 +320,7 @@ function barf
mov x0, x13
bl putdecn

- mov x8, #__NR_getpid
- svc #0
-// fpsimd.c acitivty log dump hack
-// ldr w0, =0xdeadc0de
-// mov w8, #__NR_exit
-// svc #0
-// ^ end of hack
- mov x1, #SIGABRT
- mov x8, #__NR_kill
- svc #0
-// mov x8, #__NR_exit
-// mov x1, #1
-// svc #0
+ b exit_error
endfunction

function vl_barf
diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S
index c6cfbdeb2f0c..7fbd96face01 100644
--- a/tools/testing/selftests/arm64/fp/zt-test.S
+++ b/tools/testing/selftests/arm64/fp/zt-test.S
@@ -225,12 +225,6 @@ function _start
endfunction

function barf
-// fpsimd.c acitivty log dump hack
-// ldr w0, =0xdeadc0de
-// mov w8, #__NR_exit
-// svc #0
-// end hack
-
mrs x13, S3_3_C4_C2_2
smstop
mov x10, x0 // expected data
@@ -256,19 +250,7 @@ function barf
mov x0, x13
bl putdecn

- mov x8, #__NR_getpid
- svc #0
-// fpsimd.c acitivty log dump hack
-// ldr w0, =0xdeadc0de
-// mov w8, #__NR_exit
-// svc #0
-// ^ end of hack
- mov x1, #SIGABRT
- mov x8, #__NR_kill
- svc #0
-// mov x8, #__NR_exit
-// mov x1, #1
-// svc #0
+ b exit_error
endfunction

function svcr_barf

--
2.47.3