selftests/powerpc: Add checks for transactional sigreturn
authorBreno Leitao <leitao@debian.org>
Mon, 26 Nov 2018 20:12:01 +0000 (18:12 -0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Dec 2018 03:46:50 +0000 (14:46 +1100)
commit34642d70ac7e5609e31c36edbf3b19e0d8833be7
tree0d59fde76705f8b099454905bf3beffe1f12bf2c
parent6f5b9f018f4c7686fd944d920209d1382d320e4e
selftests/powerpc: Add checks for transactional sigreturn

This is a new test case that creates a signal and starts a suspended
transaction inside the signal handler.

It returns from the signal handler with the CPU at suspended state, but
without setting user context MSR Transaction State (TS) field.

The kernel signal handler code should be able to handle this discrepancy
instead of crashing.

This code could be compiled and used to test 32 and 64-bits signal
handlers.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/tm/.gitignore
tools/testing/selftests/powerpc/tm/Makefile
tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c [new file with mode: 0644]