Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 192b2e74 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

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: a08082f8 ("powerpc/selftests: Check endianness on trap in TM")
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent eb0a2d26
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -255,6 +255,8 @@ int tm_trap_test(void)


	struct sigaction trap_sa;
	struct sigaction trap_sa;


	SKIP_IF(!have_htm());

	trap_sa.sa_flags = SA_SIGINFO;
	trap_sa.sa_flags = SA_SIGINFO;
	trap_sa.sa_sigaction = trap_signal_handler;
	trap_sa.sa_sigaction = trap_signal_handler;
	sigaction(SIGTRAP, &trap_sa, NULL);
	sigaction(SIGTRAP, &trap_sa, NULL);