From: Michael Ellerman <mpe@ellerman.id.au> Date: 2018-10-29 11:26:10
From: Joel Stanley <joel@jms.id.au>
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.
It also means we don't need our own clean rule, lib.mk does it.
We also have to update the ptrace-pkey and core-pkey rules to use
$(OUTPUT).
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/powerpc/ptrace/Makefile | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2018-10-29 11:28:12
From: Joel Stanley <joel@jms.id.au>
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.
It also means we don't need our own clean rule, lib.mk does it.
We also have to update the signal_tm rule to use $(OUTPUT).
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/powerpc/signal/Makefile | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2018-10-29 11:30:25
From: Joel Stanley <joel@jms.id.au>
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.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\
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2018-10-29 11:32:35
For the out-of-tree build to work we need to tell switch_endian_test
to look for check-reversed.S in $(OUTPUT).
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/powerpc/switch_endian/Makefile | 1 +
1 file changed, 1 insertion(+)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2018-10-29 11:34:35
Use TEST_GEN_PROGS and don't redefine all, this makes the out-of-tree
build work. We need to move the extra dependencies below the include
of lib.mk, because it adds the $(OUTPUT) prefix if it's defined.
We can also drop the clean rule, lib.mk does it for us.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/powerpc/cache_shape/Makefile | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
From: Michael Ellerman <hidden> Date: 2018-11-01 12:54:02
On Mon, 2018-10-29 at 11:23:49 UTC, Michael Ellerman wrote:
From: Joel Stanley <joel@jms.id.au>
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.
It also means we don't need our own clean rule, lib.mk does it.
We also have to update the ptrace-pkey and core-pkey rules to use
$(OUTPUT).
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>