diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2018-02-26 13:17:07 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-02-26 13:18:25 +1100 |
commit | 192b2e742c06af399e8eecb4a1726520bfccece8 (patch) | |
tree | f50baa0b029b9c362eba51fc353f2e204d352a54 /tools/testing | |
parent | eb0a2d2620ae431c543963c8c7f08f597366fc60 (diff) | |
download | blackbird-obmc-linux-192b2e742c06af399e8eecb4a1726520bfccece8.tar.gz blackbird-obmc-linux-192b2e742c06af399e8eecb4a1726520bfccece8.zip |
selftests/powerpc: Skip tm-trap if transactional memory is not enabled
Some processor revisions do not support transactional memory, and
additionally kernel support can be disabled. In either case the
tm-trap test should be skipped, otherwise it will fail with a SIGILL.
Fixes: a08082f8e4e1 ("powerpc/selftests: Check endianness on trap in TM")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/powerpc/tm/tm-trap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/tm/tm-trap.c b/tools/testing/selftests/powerpc/tm/tm-trap.c index 5d92c23ee6cb..179d592f0073 100644 --- a/tools/testing/selftests/powerpc/tm/tm-trap.c +++ b/tools/testing/selftests/powerpc/tm/tm-trap.c @@ -255,6 +255,8 @@ int tm_trap_test(void) struct sigaction trap_sa; + SKIP_IF(!have_htm()); + trap_sa.sa_flags = SA_SIGINFO; trap_sa.sa_sigaction = trap_signal_handler; sigaction(SIGTRAP, &trap_sa, NULL); |