[PATCH] selftests/powerpc: Skip tm-trap if transactional memory is not enabled

Subsystems: kernel selftest framework, the rest

STALE3102d

2 messages, 2 authors, 2018-03-05 · open the first message on its own page

[PATCH] selftests/powerpc: Skip tm-trap if transactional memory is not enabled

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-02-26 02:19:34

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>
---
 tools/testing/selftests/powerpc/tm/tm-trap.c | 2 ++
 1 file changed, 2 insertions(+)
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);
-- 
2.14.1

Re: selftests/powerpc: Skip tm-trap if transactional memory is not enabled

From: Michael Ellerman <hidden>
Date: 2018-03-05 12:36:13

On Mon, 2018-02-26 at 02:19:26 UTC, Michael Ellerman wrote:
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>
Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/192b2e742c06af399e8eecb4a17265

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help