summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64/fp/sve-test.S
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-08-29 16:44:50 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-09-06 18:31:41 +0100
commit05a5980f7ff50e6c18a9f38ca49521180a333fdf (patch)
tree2bd4b8ba28c4eb7096c22a1e573380e7cf2e951b /tools/testing/selftests/arm64/fp/sve-test.S
parent9e40e6272353ea0fde654b548c96e8bbab2fed9f (diff)
downloadlinux-05a5980f7ff50e6c18a9f38ca49521180a333fdf.tar.bz2
kselftest/arm64: Count SIGUSR2 deliveries in FP stress tests
Currently the floating point stress tests mostly support testing that the data they are checking can be disrupted from a signal handler triggered by SIGUSR1. This is not properly implemented for all the tests and in testing is frequently modified to just handle the signal without corrupting data in order to ensure that signal handling does not corrupt data. Directly support this usage by installing a SIGUSR2 handler which simply counts the signal delivery. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220829154452.824870-3-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64/fp/sve-test.S')
-rw-r--r--tools/testing/selftests/arm64/fp/sve-test.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S
index 589264231a2d..79c56e6c5b23 100644
--- a/tools/testing/selftests/arm64/fp/sve-test.S
+++ b/tools/testing/selftests/arm64/fp/sve-test.S
@@ -314,6 +314,15 @@ function irritator_handler
ret
endfunction
+function tickle_handler
+ // Increment the signal count (x23):
+ ldr x0, [x2, #ucontext_regs + 8 * 23]
+ add x0, x0, #1
+ str x0, [x2, #ucontext_regs + 8 * 23]
+
+ ret
+endfunction
+
function terminate_handler
mov w21, w0
mov x20, x2
@@ -423,6 +432,12 @@ _start:
orr w2, w2, #SA_NODEFER
bl setsignal
+ mov w0, #SIGUSR2
+ adr x1, tickle_handler
+ mov w2, #SA_SIGINFO
+ orr w2, w2, #SA_NODEFER
+ bl setsignal
+
#ifdef SSVE
smstart_sm // syscalls will have exited streaming mode
#endif