summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-12-02 06:00:04 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-14 10:41:48 +0100
commitb319ee8445961c5f7b2fd199c0ef99c418ee2d4a (patch)
treea4947406ac77582fe88f859bd33831d8f59e959a /tools/testing
parentselftests/powerpc: Move TM helpers into tm.h (diff)
downloadlinux-b319ee8445961c5f7b2fd199c0ef99c418ee2d4a.tar.xz
linux-b319ee8445961c5f7b2fd199c0ef99c418ee2d4a.zip
selftests/powerpc: Skip tm-resched-dscr if we don't have TM
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/powerpc/tm/Makefile4
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-resched-dscr.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index e7b9be7947c8..63b55d01da35 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -2,9 +2,9 @@ TEST_PROGS := tm-resched-dscr tm-syscall
all: $(TEST_PROGS)
-$(TEST_PROGS): ../harness.c
+$(TEST_PROGS): ../harness.c ../utils.c
-tm-syscall: tm-syscall-asm.S ../utils.c
+tm-syscall: tm-syscall-asm.S
tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
include ../../lib.mk
diff --git a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
index 42d4c8caad81..8fde93d6021f 100644
--- a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
+++ b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
@@ -29,6 +29,7 @@
#include <asm/tm.h>
#include "utils.h"
+#include "tm.h"
#define TBEGIN ".long 0x7C00051D ;"
#define TEND ".long 0x7C00055D ;"
@@ -42,6 +43,8 @@ int test_body(void)
{
uint64_t rv, dscr1 = 1, dscr2, texasr;
+ SKIP_IF(!have_htm());
+
printf("Check DSCR TM context switch: ");
fflush(stdout);
for (;;) {