Skip to contentSkip to conversation

selftests/powerpc: Add test to check if TM SPRs are corrupted

PATCH New Rashmica Gupta 1 participant 1 message Dec 16, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/powerpc: Add test to check if TM SPRs are corrupted

Just testing that things are behaving the way they should. Uses more threads than cpus to see if the following values persist with context switching:
- the FS (failure summary) flag in TEXASR
- TFIAR and TFHAR

---
 tools/testing/selftests/powerpc/tm/.gitignore |   1 +
 tools/testing/selftests/powerpc/tm/Makefile   |   6 +-
 tools/testing/selftests/powerpc/tm/tm-tmspr.c | 154 ++++++++++++++++++++++++++
 3 files changed, 159 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/powerpc/tm/tm-tmspr.c
tools/testing/selftests/powerpc/tm/.gitignore +1 -0
index c4667790d01d..42a6467afe93 100644
@@ -3,3 +3,4 @@ tm-syscall
 tm-signal-msr-resv
 tm-signal-stack 
 tm-vmxcopy
+tm-tmspr
tools/testing/selftests/powerpc/tm/Makefile +4 -2
index d013447fb6d9..21435399e8e9 100644
@@ -1,11 +1,13 @@
-TEST_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack tm-vmxcopy
+TEST_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack tm-vmxcopy tm-tmspr
 
 all: $(TEST_PROGS)
 
 $(TEST_PROGS): ../harness.c ../utils.c
 
 tm-syscall: tm-syscall-asm.S
-	tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
+tm-syscall: CFLAGS += -mhtm -I../../../../../usr/include
+
+tm-tmspr: CFLAGS += -pthread
 
 include ../../lib.mk
 
tools/testing/selftests/powerpc/tm/tm-tmspr.c new file +154 -0

154 lines not on this page · raw message

Signature · 1 line
2.5.0