diff options
author | John Hubbard <jhubbard@nvidia.com> | 2023-07-12 12:35:14 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-07-14 12:32:42 -0600 |
commit | c77896b143d3c9c3e84c4ed0662b807ccbd8730b (patch) | |
tree | e2b3328ab8eeef10f05c9bf8db123bbc373a8908 | |
parent | e8b03aef194c3c8597f4fb8e58ade1cc1f43001e (diff) | |
download | linux-stable-c77896b143d3c9c3e84c4ed0662b807ccbd8730b.tar.gz linux-stable-c77896b143d3c9c3e84c4ed0662b807ccbd8730b.tar.bz2 linux-stable-c77896b143d3c9c3e84c4ed0662b807ccbd8730b.zip |
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 9fc96c7c19df
("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: 9fc96c7c19df ("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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
-rw-r--r-- | tools/testing/selftests/riscv/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/riscv/Makefile b/tools/testing/selftests/riscv/Makefile index 9dd629cc86aa..f4b3d5c9af5b 100644 --- a/tools/testing/selftests/riscv/Makefile +++ b/tools/testing/selftests/riscv/Makefile @@ -43,7 +43,7 @@ run_tests: all done # Avoid any output on non riscv on emit_tests -emit_tests: all +emit_tests: @for DIR in $(RISCV_SUBTARGETS); do \ BUILD_TARGET=$(OUTPUT)/$$DIR; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@; \ |