From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:19:47
This series fixes issues I encountered building and running the
selftests on a Ubuntu Cosmic ppc64le system.
Joel Stanley (6):
selftests: powerpc/ptrace: Make tests build
selftests: powerpc/ptrace: Remove clean rule
selftests: powerpc/ptrace: Fix linking against pthread
selftests: powerpc/signal: Make tests build
selftests: powerpc/signal: Fix signal_tm CFLAGS
selftests: powerpc/pmu: Link ebb tests with -no-pie
tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
tools/testing/selftests/powerpc/ptrace/Makefile | 11 ++++-------
tools/testing/selftests/powerpc/signal/Makefile | 9 +++------
3 files changed, 10 insertions(+), 13 deletions(-)
--
2.19.1
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:22:17
According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/testing/selftests/powerpc/ptrace/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:24:42
When running 'make ptrace':
make[1]: Entering directory 'tools/testing/selftests/powerpc/ptrace'
Makefile:18: warning: overriding recipe for target 'clean'
../../lib.mk:137: warning: ignoring old recipe for target 'clean'
The rule is unnecessary as TEST_GEN_FILES are cleaned up by the rule in
lib.mk.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/testing/selftests/powerpc/ptrace/Makefile | 3 ---
1 file changed, 3 deletions(-)
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:27:04
Some of the ptrace tests require -ptrace when linking:
/usr/bin/ld: /tmp/ccH32S9w.o: in function `init_child_sync':
core-pkey.c:(.text+0x1d64): undefined reference to `sem_init'
The targets for these tests are modfied in lib.mk to add the $(OUTPUT)
prefix. The makefile needs to specify that modifying those rules, or
else they do not match and we miss out on the extra flags.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/testing/selftests/powerpc/ptrace/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:29:22
According to lib.mk, TEST_PROGS is for shell scripts. It appears we need
to define the programs as TEST_GEN_PROGS to ensure they are built.
The definition must also happen below the inclusion of lib.mk.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/testing/selftests/powerpc/signal/Makefile | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:32:07
signal_tm tries to build with -mhtm but it currently does not.
The targets is modified in lib.mk to add the $(OUTPUT) prefix. The
makefile needs to specify that modifying the rules, or else it does
not match and we miss out on the extra flag.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/testing/selftests/powerpc/signal/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-23 06:34:25
When running the ebb tests after building on a ppc64le Ubuntu machine:
$ pmu/ebb/reg_access_test: error while loading shared libraries:
R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
range
This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
1 file changed, 3 insertions(+)
@@ -5,6 +5,9 @@ noarg:# The EBB handler is 64-bit code and everything links against itCFLAGS+=-m64+# Toolchains may build PIE by default which breaks the assembly+LDFLAGS+=-no-pie+TEST_GEN_PROGS:=reg_access_testevent_attributes_testcycles_test\cycles_with_freeze_testpmc56_overflow_test\ebb_vs_cpu_event_testcpu_event_vs_ebb_test\