Commit 7e0cf1c9 authored by Michael Ellerman's avatar Michael Ellerman

selftests/powerpc: Fix Makefiles for headers_install change

Commit b2d35fa5 ("selftests: add headers_install to lib.mk")
introduced a requirement that Makefiles more than one level below the
selftests directory need to define top_srcdir, but it didn't update
any of the powerpc Makefiles.

This broke building all the powerpc selftests with eg:

  make[1]: Entering directory '/src/linux/tools/testing/selftests/powerpc'
  BUILD_TARGET=/src/linux/tools/testing/selftests/powerpc/alignment; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C alignment all
  make[2]: Entering directory '/src/linux/tools/testing/selftests/powerpc/alignment'
  ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
  make[2]: *** No rule to make target '../../../../scripts/subarch.include'.
  make[2]: Failed to remake makefile '../../../../scripts/subarch.include'.
  Makefile:38: recipe for target 'alignment' failed

Fix it by setting top_srcdir in the affected Makefiles.

Fixes: b2d35fa5 ("selftests: add headers_install to lib.mk")
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 2483ef05
TEST_GEN_PROGS := copy_first_unaligned alignment_handler TEST_GEN_PROGS := copy_first_unaligned alignment_handler
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c ../utils.c $(TEST_GEN_PROGS): ../harness.c ../utils.c
...@@ -4,6 +4,7 @@ TEST_GEN_FILES := exec_target ...@@ -4,6 +4,7 @@ TEST_GEN_FILES := exec_target
CFLAGS += -O2 CFLAGS += -O2
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c $(TEST_GEN_PROGS): ../harness.c
......
...@@ -5,6 +5,7 @@ all: $(TEST_PROGS) ...@@ -5,6 +5,7 @@ all: $(TEST_PROGS)
$(TEST_PROGS): ../harness.c ../utils.c $(TEST_PROGS): ../harness.c ../utils.c
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
clean: clean:
......
...@@ -17,6 +17,7 @@ TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \ ...@@ -17,6 +17,7 @@ TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \
EXTRA_SOURCES := validate.c ../harness.c stubs.S EXTRA_SOURCES := validate.c ../harness.c stubs.S
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES) $(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES)
......
...@@ -3,6 +3,7 @@ TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \ ...@@ -3,6 +3,7 @@ TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \
dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \ dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \
dscr_sysfs_thread_test dscr_sysfs_thread_test
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(OUTPUT)/dscr_default_test: LDLIBS += -lpthread $(OUTPUT)/dscr_default_test: LDLIBS += -lpthread
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c $(TEST_GEN_PROGS): ../harness.c
......
...@@ -5,6 +5,7 @@ noarg: ...@@ -5,6 +5,7 @@ noarg:
TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao segv_errors TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao segv_errors
TEST_GEN_FILES := tempfile TEST_GEN_FILES := tempfile
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c $(TEST_GEN_PROGS): ../harness.c
......
...@@ -5,6 +5,7 @@ noarg: ...@@ -5,6 +5,7 @@ noarg:
TEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes TEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes
EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
all: $(TEST_GEN_PROGS) ebb all: $(TEST_GEN_PROGS) ebb
......
...@@ -17,6 +17,7 @@ TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \ ...@@ -17,6 +17,7 @@ TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \
lost_exception_test no_handler_test \ lost_exception_test no_handler_test \
cycles_with_mmcr2_test cycles_with_mmcr2_test
top_srcdir = ../../../../../..
include ../../../lib.mk include ../../../lib.mk
$(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \ $(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \
......
...@@ -2,6 +2,7 @@ CFLAGS += -I$(CURDIR) ...@@ -2,6 +2,7 @@ CFLAGS += -I$(CURDIR)
TEST_GEN_PROGS := load_unaligned_zeropad TEST_GEN_PROGS := load_unaligned_zeropad
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c $(TEST_GEN_PROGS): ../harness.c
...@@ -4,6 +4,7 @@ TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ ...@@ -4,6 +4,7 @@ TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \ ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
perf-hwbreak perf-hwbreak
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
all: $(TEST_PROGS) all: $(TEST_PROGS)
......
...@@ -8,6 +8,7 @@ $(TEST_PROGS): ../harness.c ../utils.c signal.S ...@@ -8,6 +8,7 @@ $(TEST_PROGS): ../harness.c ../utils.c signal.S
CFLAGS += -maltivec CFLAGS += -maltivec
signal_tm: CFLAGS += -mhtm signal_tm: CFLAGS += -mhtm
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
clean: clean:
......
...@@ -29,6 +29,7 @@ endif ...@@ -29,6 +29,7 @@ endif
ASFLAGS = $(CFLAGS) ASFLAGS = $(CFLAGS)
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): $(EXTRA_SOURCES) $(TEST_GEN_PROGS): $(EXTRA_SOURCES)
...@@ -5,6 +5,7 @@ ASFLAGS += -O2 -Wall -g -nostdlib -m64 ...@@ -5,6 +5,7 @@ ASFLAGS += -O2 -Wall -g -nostdlib -m64
EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S $(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S
......
...@@ -2,6 +2,7 @@ TEST_GEN_PROGS := ipc_unmuxed ...@@ -2,6 +2,7 @@ TEST_GEN_PROGS := ipc_unmuxed
CFLAGS += -I../../../../../usr/include CFLAGS += -I../../../../../usr/include
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c $(TEST_GEN_PROGS): ../harness.c
...@@ -6,6 +6,7 @@ TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack ...@@ -6,6 +6,7 @@ TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack
tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \ tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \
$(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn $(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c ../utils.c $(TEST_GEN_PROGS): ../harness.c ../utils.c
......
...@@ -2,6 +2,7 @@ TEST_GEN_PROGS := test-vphn ...@@ -2,6 +2,7 @@ TEST_GEN_PROGS := test-vphn
CFLAGS += -m64 CFLAGS += -m64
top_srcdir = ../../../../..
include ../../lib.mk include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c $(TEST_GEN_PROGS): ../harness.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment