diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-12-02 00:00:04 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-12-14 04:41:48 -0500 |
commit | b319ee8445961c5f7b2fd199c0ef99c418ee2d4a (patch) | |
tree | a4947406ac77582fe88f859bd33831d8f59e959a /tools | |
parent | 34dc8b279dc5dd3ce863298056989bdd7f4979c8 (diff) |
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')
-rw-r--r-- | tools/testing/selftests/powerpc/tm/Makefile | 4 | ||||
-rw-r--r-- | tools/testing/selftests/powerpc/tm/tm-resched-dscr.c | 3 |
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 | |||
2 | 2 | ||
3 | all: $(TEST_PROGS) | 3 | all: $(TEST_PROGS) |
4 | 4 | ||
5 | $(TEST_PROGS): ../harness.c | 5 | $(TEST_PROGS): ../harness.c ../utils.c |
6 | 6 | ||
7 | tm-syscall: tm-syscall-asm.S ../utils.c | 7 | tm-syscall: tm-syscall-asm.S |
8 | tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include | 8 | tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include |
9 | 9 | ||
10 | include ../../lib.mk | 10 | 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 @@ | |||
29 | #include <asm/tm.h> | 29 | #include <asm/tm.h> |
30 | 30 | ||
31 | #include "utils.h" | 31 | #include "utils.h" |
32 | #include "tm.h" | ||
32 | 33 | ||
33 | #define TBEGIN ".long 0x7C00051D ;" | 34 | #define TBEGIN ".long 0x7C00051D ;" |
34 | #define TEND ".long 0x7C00055D ;" | 35 | #define TEND ".long 0x7C00055D ;" |
@@ -42,6 +43,8 @@ int test_body(void) | |||
42 | { | 43 | { |
43 | uint64_t rv, dscr1 = 1, dscr2, texasr; | 44 | uint64_t rv, dscr1 = 1, dscr2, texasr; |
44 | 45 | ||
46 | SKIP_IF(!have_htm()); | ||
47 | |||
45 | printf("Check DSCR TM context switch: "); | 48 | printf("Check DSCR TM context switch: "); |
46 | fflush(stdout); | 49 | fflush(stdout); |
47 | for (;;) { | 50 | for (;;) { |