selftests: Skip TM tests on synthetic TM implementations
authorJordan Niethe <jniethe5@gmail.com>
Thu, 29 Jul 2021 04:13:17 +0000 (14:13 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 26 Aug 2021 11:21:06 +0000 (21:21 +1000)
commite42edf9b9d126bb1c743f2e7984877ba27f09fe7
tree90dc8432d15c6ed88f7e2e3b621ec8499ccc1f03
parentc95278a0534449efc64ac8169382bce217963be2
selftests: Skip TM tests on synthetic TM implementations

Transactional Memory was removed from the architecture in ISA v3.1. For
threads running in P8/P9 compatibility mode on P10 a synthetic TM
implementation is provided. In this implementation, tbegin. always sets
cr0 eq meaning the abort handler is always called. This is not an issue
as users of TM are expected to have a fallback non transactional way to
make forward progress in the abort handler.  The TEXASR indicates if a
transaction failure is due to a synthetic implementation.

Some of the TM self tests need a non-degenerate TM implementation for
their testing to be meaningful so check for a synthetic implementation
and skip the test if so.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210729041317.366612-2-jniethe5@gmail.com
28 files changed:
tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr.c
tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-gpr.c
tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar.c
tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c
tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c
tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar.c
tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c
tools/testing/selftests/powerpc/signal/signal_tm.c
tools/testing/selftests/powerpc/tm/tm-exec.c
tools/testing/selftests/powerpc/tm/tm-fork.c
tools/testing/selftests/powerpc/tm/tm-poison.c
tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-fpu.c
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-gpr.c
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-vmx.c
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-vsx.c
tools/testing/selftests/powerpc/tm/tm-signal-pagefault.c
tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c
tools/testing/selftests/powerpc/tm/tm-signal-stack.c
tools/testing/selftests/powerpc/tm/tm-sigreturn.c
tools/testing/selftests/powerpc/tm/tm-syscall.c
tools/testing/selftests/powerpc/tm/tm-tar.c
tools/testing/selftests/powerpc/tm/tm-tmspr.c
tools/testing/selftests/powerpc/tm/tm-trap.c
tools/testing/selftests/powerpc/tm/tm-unavailable.c
tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c
tools/testing/selftests/powerpc/tm/tm-vmxcopy.c
tools/testing/selftests/powerpc/tm/tm.h