On Tue, Sep 01, 2026 at 06:06:44PM +0100, Mark Brown wrote:
> The fp-stress test loads all deliver a SIGABRT to the process group to
> report some errors they detect. There is no particular reason to use
> this mechanism over exiting with an error code, the fp-stress harness does
> not care.

That's not quite true; sending a SIGABRT to the entire process group
will kill the harness and other tests, resulting in lost output.

I mentioned that in the patches I linked you to a while back:

  
https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=922d15ef46cb486a79f168949e103f6df26f4fba

That aside, this is a good cleanup.

Mark.

> In order to facilitate running as KVM guests replace this with
> use of the exit_error() function we added.
> 
> Signed-off-by: Mark Brown <[email protected]>
> ---
>  tools/testing/selftests/arm64/fp/fpsimd-test.S | 10 ++--------
>  tools/testing/selftests/arm64/fp/sve-test.S    | 10 ++--------
>  tools/testing/selftests/arm64/fp/za-test.S     | 10 ++--------
>  tools/testing/selftests/arm64/fp/zt-test.S     |  8 +-------
>  4 files changed, 7 insertions(+), 31 deletions(-)
> 
> diff --git a/tools/testing/selftests/arm64/fp/fpsimd-test.S 
> b/tools/testing/selftests/arm64/fp/fpsimd-test.S
> index 5ee8ef51ea4e..fcbb3a872490 100644
> --- a/tools/testing/selftests/arm64/fp/fpsimd-test.S
> +++ b/tools/testing/selftests/arm64/fp/fpsimd-test.S
> @@ -176,7 +176,7 @@ function setsignal
>       cbz     w0, 1f
>  
>       puts    "sigaction failure\n"
> -     b       .Labort
> +     b       exit_error
>  
>  1:   ldr     x30, [sp], #((sa_sz + 15) / 16 * 16 + 16)
>       ret
> @@ -224,7 +224,7 @@ function _start
>  1:   puts    "Bad vector length: "
>       mov     x0, x19
>       bl      putdecn
> -     b       .Labort
> +     b       exit_error
>  
>  2:   puts    "Vector length:\t"
>       mov     x0, x19
> @@ -266,12 +266,6 @@ function _start
>  
>       add     x22, x22, #1
>       b       .Ltest_loop
> -
> -.Labort:
> -     mov     x0, #0
> -     mov     x1, #SIGABRT
> -     mov     x8, #__NR_kill
> -     svc     #0
>  endfunction
>  
>  function barf
> diff --git a/tools/testing/selftests/arm64/fp/sve-test.S 
> b/tools/testing/selftests/arm64/fp/sve-test.S
> index 3447fe0e5554..26efdbdd88f9 100644
> --- a/tools/testing/selftests/arm64/fp/sve-test.S
> +++ b/tools/testing/selftests/arm64/fp/sve-test.S
> @@ -344,7 +344,7 @@ function setsignal
>       cbz     w0, 1f
>  
>       puts    "sigaction failure\n"
> -     b       .Labort
> +     b       exit_error
>  
>  1:   ldr     x30, [sp], #((sa_sz + 15) / 16 * 16 + 16)
>       ret
> @@ -397,7 +397,7 @@ function _start
>  1:   puts    "Bad vector length: "
>       mov     x0, x19
>       bl      putdecn
> -     b       .Labort
> +     b       exit_error
>  
>  2:   puts    "Vector length:\t"
>       mov     x0, x19
> @@ -474,12 +474,6 @@ function _start
>  
>       add     x22, x22, #1
>       b       .Ltest_loop
> -
> -.Labort:
> -     mov     x0, #0
> -     mov     x1, #SIGABRT
> -     mov     x8, #__NR_kill
> -     svc     #0
>  endfunction
>  
>  function barf
> diff --git a/tools/testing/selftests/arm64/fp/za-test.S 
> b/tools/testing/selftests/arm64/fp/za-test.S
> index 33dc4ce8bfa1..7208bb2db9f1 100644
> --- a/tools/testing/selftests/arm64/fp/za-test.S
> +++ b/tools/testing/selftests/arm64/fp/za-test.S
> @@ -189,7 +189,7 @@ function setsignal
>       cbz     w0, 1f
>  
>       puts    "sigaction failure\n"
> -     b       .Labort
> +     b       exit_error
>  
>  1:   ldr     x30, [sp], #((sa_sz + 15) / 16 * 16 + 16)
>       ret
> @@ -240,7 +240,7 @@ function _start
>  1:   puts    "bad vector length: "
>       mov     x0, x19
>       bl      putdecn
> -     b       .Labort
> +     b       exit_error
>  
>  2:   puts    "vector length:\t"
>       mov     x0, x19
> @@ -288,12 +288,6 @@ function _start
>  
>       add     x22, x22, #1    // Everything still working
>       b       .Ltest_loop
> -
> -.Labort:
> -     mov     x0, #0
> -     mov     x1, #SIGABRT
> -     mov     x8, #__NR_kill
> -     svc     #0
>  endfunction
>  
>  function barf
> diff --git a/tools/testing/selftests/arm64/fp/zt-test.S 
> b/tools/testing/selftests/arm64/fp/zt-test.S
> index c67242c2d5ab..c6cfbdeb2f0c 100644
> --- a/tools/testing/selftests/arm64/fp/zt-test.S
> +++ b/tools/testing/selftests/arm64/fp/zt-test.S
> @@ -158,7 +158,7 @@ function setsignal
>       cbz     w0, 1f
>  
>       puts    "sigaction failure\n"
> -     b       .Labort
> +     b       exit_error
>  
>  1:   ldr     x30, [sp], #((sa_sz + 15) / 16 * 16 + 16)
>       ret
> @@ -222,12 +222,6 @@ function _start
>  
>       add     x22, x22, #1    // Everything still working
>       b       .Ltest_loop
> -
> -.Labort:
> -     mov     x0, #0
> -     mov     x1, #SIGABRT
> -     mov     x8, #__NR_kill
> -     svc     #0
>  endfunction
>  
>  function barf
> 
> -- 
> 2.47.3
> 

Reply via email to