-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[runtimes] Add missing test dependencies to check-all #72955
Conversation
The test-depends target contained all the dependencies needed to run the runtimes tests, but it was never added as a dependency of check-all. This led to some of the tsan tests to fail, since the custom libcxx build they were using was never built. Fixes llvm#58680
I don't think this is correct, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot that we treat check-all
specially and rather than running separate lit instances for runtimes, we collect all test suites from subbuilds and run a single instance. Given that, I think this is the correct solution. Thanks for figuring this out!
The test-depends target contained all the dependencies needed to run the runtimes tests, but it was never added as a dependency of check-all. This caused some of the tsan tests to fail, since the custom libcxx build the tests were looking for was never built. Besides the tsan failures, this fixes all the other test failures I was seeing with: cmake -G Ninja -B release-build -S llvm \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" This is the same configuration the test-release.sh script uses, so I'm hoping this will also fix all the test failures we've been seeing when building the releases. Fixes #58680 (cherry picked from commit 7f215b1)
Heads up that we're seeing builds fail with "unknown target 'runtimes-test-depends'" which is most likely due to this. (https://crbug.com/1505361). I'll try to verify that and come up with some kind of reproducer. |
A reproducer on Linux:
|
I'll revert until this can be fixed. We should probably revert from the release branch too. |
This caused some runtimes builds to fail with: error: unknown target 'runtimes-test-depends' See comments on the PR. > The test-depends target contained all the dependencies needed to run the > runtimes tests, but it was never added as a dependency of check-all. > This caused some of the tsan tests to fail, since the custom libcxx > build the tests were looking for was never built. Besides the tsan > failures, this fixes all the other test failures I was seeing with: > cmake -G Ninja -B release-build -S llvm \ > -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ > -DCMAKE_BUILD_TYPE=Release \ > -DLLVM_ENABLE_ASSERTIONS=OFF \ > -DLLVM_ENABLE_PROJECTS="clang;lld" \ > -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" > > This is the same configuration the test-release.sh script uses, so I'm > hoping this will also fix all the test failures we've been seeing when > building the releases. > > Fixes #58680 This reverts commit 7f215b1.
@zmodem I think there are some steps missing in the reproducer script. Is the sdk supposed to be unpacked into the llvm-project directory? Where do I run the cmake invocation from? |
Sorry, I suppose the missing first line would be: "run the commands from a build directory under llvm-project/, e.g. llvm-project/build/" (or adjust the |
@zmodem I got it working now, thanks. |
It looks like this change uncovered an existing problem where the code in llvm/runtimes/CMakeLists.txt assumes that if LLVM_INCLUDE_TESTS=ON is set that tests will be enabled for the runtime builds too. However, this configuration breaks this assumption by passing -DRUNTIMES_aarch64-linux-android21_LLVM_INCLUDE_TESTS=OFF, which disables the tests for the runtime build. Even without this change, trying to use targets like 'ninja test-depends I think I can come up with a fix to make this patch work, but it seems like there may be some other problems here that haven't been uncovered yet. |
I can also take a look but I don't want to duplicate effort, @tstellar please let me know if you need help. |
@zmodem @petrhosek I have a fix here: #73610 If the fix is good, then I'll push it first and let it sit in main awhile before re-committing the reverted patch. |
This reverts commit e957e6d. The commit was reverted on main because of issues. We will not carry this in the release branch for 17.x
Local branch amd-gfx 83aac61 Merged main:f21a70f9fe21 into amd-gfx:41205cbd2f82 Remote branch main a9e3d23 Revert "[runtimes] Add missing test dependencies to check-all (llvm#72955)"
The test-depends target contained all the dependencies needed to run the runtimes tests, but it was never added as a dependency of check-all. This caused some of the tsan tests to fail, since the custom libcxx build the tests were looking for was never built. Besides the tsan failures, this fixes all the other test failures I was seeing with: cmake -G Ninja -B release-build -S llvm \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" This is the same configuration the test-release.sh script uses, so I'm hoping this will also fix all the test failures we've been seeing when building the releases. Fixes llvm#58680 (cherry picked from commit 7f215b1)
The test-depends target contained all the dependencies needed to run the runtimes tests, but it was never added as a dependency of check-all. This caused some of the tsan tests to fail, since the custom libcxx build the tests were looking for was never built. Besides the tsan failures, this fixes all the other test failures I was seeing with:
cmake -G Ninja -B release-build -S llvm
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_ASSERTIONS=OFF
-DLLVM_ENABLE_PROJECTS="clang;lld"
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt"
This is the same configuration the test-release.sh script uses, so I'm hoping this will also fix all the test failures we've been seeing when building the releases.
Fixes #58680