Skip to contentSkip to conversation

selftests/powerpc: Always build the tm-poison test 64-bit

PATCH Applied Michael Ellerman 3 participants 3 messages Apr 3, 2020 – Apr 6, 2020

Subsystems (2)
lore
Share & tools
lore

Michael Ellerman

author reviewer
#0 lore raw

PATCH 1/1 selftests/powerpc: Always build the tm-poison test 64-bit

The tm-poison test includes inline asm which is 64-bit only, so the test must be built 64-bit in order to work.

Otherwise it fails, eg:

  # file tm-poison
  tm-poison: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV) ...
  # ./tm-poison
  test: tm_poison_test
  Unknown value 0x1fff71150 leaked into f31!
  Unknown value 0x1fff710c0 leaked into vr31!
  failure: tm_poison_test
Fixes a003365cab64 ("powerpc/tm: Add tm-poison test")
---
 tools/testing/selftests/powerpc/tm/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/powerpc/tm/Makefile +1 -0
index 0b0db8d3857c..5881e97c73c1 100644
@@ -25,6 +25,7 @@ $(OUTPUT)/tm-unavailable: CFLAGS += -O0 -pthread -m64 -Wno-error=uninitialized -
 $(OUTPUT)/tm-trap: CFLAGS += -O0 -pthread -m64
 $(OUTPUT)/tm-signal-context-force-tm: CFLAGS += -pthread -m64
 $(OUTPUT)/tm-signal-pagefault: CFLAGS += -pthread -m64
+$(OUTPUT)/tm-poison: CFLAGS += -m64
 
 SIGNAL_CONTEXT_CHK_TESTS := $(patsubst %,$(OUTPUT)/%,$(SIGNAL_CONTEXT_CHK_TESTS))
 $(SIGNAL_CONTEXT_CHK_TESTS): tm-signal.S

base-commit: c17eb4dca5a353a9dbbb8ad6934fe57af7165e91

Signature · 1 line
2.25.1
#1 lore raw
Quoted 12 lines · Michael Ellerman

The tm-poison test includes inline asm which is 64-bit only, so the test must be built 64-bit in order to work.

Otherwise it fails, eg:

  # file tm-poison
  tm-poison: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV) ...
  # ./tm-poison
  test: tm_poison_test
  Unknown value 0x1fff71150 leaked into f31!
  Unknown value 0x1fff710c0 leaked into vr31!
  failure: tm_poison_test
Quoted 2 lines
Fixes a003365cab64 ("powerpc/tm: Add tm-poison test")

Applied to powerpc next.

https://git.kernel.org/powerpc/c/6ba4a2d3591039aea1cb45c7c42262d26351a2fa

cheers

#2 lore raw
Quoted 13 lines · Michael Ellerman
Quoted 12 lines · Michael Ellerman

The tm-poison test includes inline asm which is 64-bit only, so the test must be built 64-bit in order to work.

Otherwise it fails, eg:

   # file tm-poison
   tm-poison: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV) ...
   # ./tm-poison
   test: tm_poison_test
   Unknown value 0x1fff71150 leaked into f31!
   Unknown value 0x1fff710c0 leaked into vr31!
   failure: tm_poison_test
Quoted 8 lines
Quoted 2 lines
Fixes a003365cab64 ("powerpc/tm: Add tm-poison test")

Applied to powerpc next.

https://git.kernel.org/powerpc/c/6ba4a2d3591039aea1cb45c7c42262d26351a2fa

cheers

Ack.

Thank you, Michael.

Cheers,
Gustavo