selftests/powerpc: Fix emit_tests to work with run_kselftest.sh
[ Upstream commit 58b33e78a31782ffe25d404d5eba9a45fe636e27 ] In order to use run_kselftest.sh the list of tests must be emitted to populate kselftest-list.txt. The powerpc Makefile is written to use EMIT_TESTS. But support for EMIT_TESTS was dropped in commitd4e59a536f("selftests: Use runner.sh for emit targets"). Although prior to that commita548de0fe8("selftests: lib.mk: add test execute bit check to EMIT_TESTS") had already broken run_kselftest.sh for powerpc due to the executable check using the wrong path. It can be fixed by replacing the EMIT_TESTS definitions with actual emit_tests rules in the powerpc Makefiles. This makes run_kselftest.sh able to run powerpc tests: $ cd linux $ export ARCH=powerpc $ export CROSS_COMPILE=powerpc64le-linux-gnu- $ make headers $ make -j -C tools/testing/selftests install $ grep -c "^powerpc" tools/testing/selftests/kselftest_install/kselftest-list.txt 182 Fixes:d4e59a536f("selftests: Use runner.sh for emit targets") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230921072623.828772-1-mpe@ellerman.id.au Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
763f029f8c
commit
aab681bcb1
2 changed files with 9 additions and 9 deletions
|
|
@ -58,12 +58,11 @@ override define INSTALL_RULE
|
|||
done;
|
||||
endef
|
||||
|
||||
override define EMIT_TESTS
|
||||
emit_tests:
|
||||
+@for TARGET in $(SUB_DIRS); do \
|
||||
BUILD_TARGET=$(OUTPUT)/$$TARGET; \
|
||||
$(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests;\
|
||||
$(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET $@;\
|
||||
done;
|
||||
endef
|
||||
|
||||
override define CLEAN
|
||||
+@for TARGET in $(SUB_DIRS); do \
|
||||
|
|
@ -76,4 +75,4 @@ endef
|
|||
tags:
|
||||
find . -name '*.c' -o -name '*.h' | xargs ctags
|
||||
|
||||
.PHONY: tags $(SUB_DIRS)
|
||||
.PHONY: tags $(SUB_DIRS) emit_tests
|
||||
|
|
|
|||
|
|
@ -30,13 +30,14 @@ override define RUN_TESTS
|
|||
+TARGET=event_code_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests
|
||||
endef
|
||||
|
||||
DEFAULT_EMIT_TESTS := $(EMIT_TESTS)
|
||||
override define EMIT_TESTS
|
||||
$(DEFAULT_EMIT_TESTS)
|
||||
emit_tests:
|
||||
for TEST in $(TEST_GEN_PROGS); do \
|
||||
BASENAME_TEST=`basename $$TEST`; \
|
||||
echo "$(COLLECTION):$$BASENAME_TEST"; \
|
||||
done
|
||||
+TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests
|
||||
+TARGET=sampling_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests
|
||||
+TARGET=event_code_tests; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests
|
||||
endef
|
||||
|
||||
DEFAULT_INSTALL_RULE := $(INSTALL_RULE)
|
||||
override define INSTALL_RULE
|
||||
|
|
@ -64,4 +65,4 @@ sampling_tests:
|
|||
event_code_tests:
|
||||
TARGET=$@; BUILD_TARGET=$$OUTPUT/$$TARGET; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $$TARGET all
|
||||
|
||||
.PHONY: all run_tests ebb sampling_tests event_code_tests
|
||||
.PHONY: all run_tests ebb sampling_tests event_code_tests emit_tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue