kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils
authorCristian Marussi <cristian.marussi@arm.com>
Fri, 25 Oct 2019 17:57:07 +0000 (18:57 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 8 Nov 2019 11:10:33 +0000 (11:10 +0000)
commitf96bf43403165e4478942b0998931b14621ec207
tree49c7215339ac6585aeb48ff534bf6962e6a6ccde
parent313a4db7f3387608a3ab4531ac8c0509a3d7617f
kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils

Add some arm64/signal specific boilerplate and utility code to help
further testcases' development.

Introduce also one simple testcase mangle_pstate_invalid_compat_toggle
and some related helpers: it is a simple mangle testcase which messes
with the ucontext_t from within the signal handler, trying to toggle
PSTATE state bits to switch the system between 32bit/64bit execution
state. Expects SIGSEGV on test PASS.

Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/Makefile
tools/testing/selftests/arm64/signal/.gitignore [new file with mode: 0644]
tools/testing/selftests/arm64/signal/Makefile [new file with mode: 0644]
tools/testing/selftests/arm64/signal/README [new file with mode: 0644]
tools/testing/selftests/arm64/signal/test_signals.c [new file with mode: 0644]
tools/testing/selftests/arm64/signal/test_signals.h [new file with mode: 0644]
tools/testing/selftests/arm64/signal/test_signals_utils.c [new file with mode: 0644]
tools/testing/selftests/arm64/signal/test_signals_utils.h [new file with mode: 0644]
tools/testing/selftests/arm64/signal/testcases/mangle_pstate_invalid_compat_toggle.c [new file with mode: 0644]
tools/testing/selftests/arm64/signal/testcases/testcases.c [new file with mode: 0644]
tools/testing/selftests/arm64/signal/testcases/testcases.h [new file with mode: 0644]