Skip to content

Commit 8c82d2b

Browse files
johnhubbardpalmer-dabbelt
authored andcommitted
selftests/riscv: fix potential build failure during the "emit_tests" step
The riscv selftests (which were modeled after the arm64 selftests) are improperly declaring the "emit_tests" target to depend upon the "all" target. This approach, when combined with commit 9fc96c7 ("selftests: error out if kernel header files are not yet built"), has caused build failures [1] on arm64, and is likely to cause similar failures for riscv. To fix this, simply remove the unnecessary "all" dependency from the emit_tests target. The dependency is still effectively honored, because again, invocation is via "install", which also depends upon "all". An alternative approach would be to harden the emit_tests target so that it can depend upon "all", but that's a lot more complicated and hard to get right, and doesn't seem worth it, especially given that emit_tests should probably not be overridden at all. [1] https://lore.kernel.org/20230710-kselftest-fix-arm64-v1-1-48e872844f25@kernel.org Fixes: 9fc96c7 ("selftests: error out if kernel header files are not yet built") Signed-off-by: John Hubbard <jhubbard@nvidia.com> Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20230712193514.740033-1-jhubbard@nvidia.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent ab2dbc7 commit 8c82d2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/riscv/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ run_tests: all
4343
done
4444

4545
# Avoid any output on non riscv on emit_tests
46-
emit_tests: all
46+
emit_tests:
4747
@for DIR in $(RISCV_SUBTARGETS); do \
4848
BUILD_TARGET=$(OUTPUT)/$$DIR; \
4949
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@; \

0 commit comments

Comments
 (0)