riscv: selftests: Add signal handling vector tests
authorCharlie Jenkins <charlie@rivosinc.com>
Wed, 3 Apr 2024 23:50:29 +0000 (16:50 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 22 May 2024 23:12:57 +0000 (16:12 -0700)
commit9d5328eeb18597749b18f42ff7df1c9f485d3c3c
tree9c3c3a31053479cb08e9f96fe580a3987852b5a0
parent4c6c0020427a4547845a83f7e4d6085e16c3e24f
riscv: selftests: Add signal handling vector tests

Add two tests to check vector save/restore when a signal is received
during a vector routine. One test ensures that a value is not clobbered
during signal handling. The other verifies that vector registers
modified in the signal handler are properly reflected when the signal
handling is complete.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Björn Töpel <bjorn@rivosinc.com>
Reviewed-by: Andy Chiu <andy.chiu@sifive.com>
Tested-by: Andy Chiu <andy.chiu@sifive.com>
Link: https://lore.kernel.org/r/20240403-vector_sigreturn_tests-v1-1-2e68b7a3b8d7@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
tools/testing/selftests/riscv/Makefile
tools/testing/selftests/riscv/sigreturn/.gitignore [new file with mode: 0644]
tools/testing/selftests/riscv/sigreturn/Makefile [new file with mode: 0644]
tools/testing/selftests/riscv/sigreturn/sigreturn.c [new file with mode: 0644]