-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Reactivate libdispatch tests on Linux #27940
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
Conversation
The swift-corelibs-libdispatch project had its build directory layout changed [1] which silently deactivated the libdispatch tests on Linux, because we use hard-coded paths to look for the required libdispatch artifacts. This change adapts the paths to the new layout. Thanks to Jordan Rose for noticing and diagnosing this [2]. SR-11568 [2] https://bugs.swift.org/browse/SR-11568 [1] swiftlang/swift-corelibs-libdispatch#515
@swift-ci Please test |
|
@swift-ci Please test |
Build failed |
Build failed |
Build failed |
lit now reports the libdispatch feature again.
Among others the following test is now executed again on Linux.
Please merge (despite other unrelated failures). |
@shahmishal It would be a nice feature of CI to get a warning in the form of a PR comment if the number of executed tests decreases for a given PR. This would help prevent "accidental disabling" of test. |
Hey J!
Is there any way we could make it so that if this happens again, we get an error instead of silently not running the tests?
… On Oct 29, 2019, at 5:16 PM, Julian Lettner ***@***.***> wrote:
lit now reports the libdispatch feature again.
lit.py: /home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift/test/lit.cfg:1678: note:
Running tests on Ubuntu-16.04
lit.py: /home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift/test/lit.cfg:1688: note:
Available features: <more text>, executable_test, fuzzer_runtime, **libdispatch**, lldb, <more text>
Among others the following test is now executed again on Linux.
PASS: Swift(linux-x86_64) :: stdlib/DispatchData.swift (7550 of 12291)
Please merge (despite other unrelated failures).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ah, no credit to me. I just tagged you when that bug was filed. |
@@ -1020,16 +1020,16 @@ elif (run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'windows-cygnus', 'w | |||
config.target_runtime = "native" | |||
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract") | |||
|
|||
libdispatch_artifact_dir = make_path(config.libdispatch_build_path, 'src') | |||
libdispatch_artifact_dir = config.libdispatch_build_path | |||
libdispatch_swift_module_dir = make_path(libdispatch_artifact_dir, 'src', 'swift', 'swift') |
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.
This path seems…worse? Why the double nesting?
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 have no idea. I just built under docker/Linux and looked where things ended up.
See my comment above: #27940 (comment)
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 think it's worth fixing the path where things get built rather than adjusting the test logic to look there.
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.
The "double" is because the swift overlay is in src/swift, and the swift modules/docs/interfaces are emitted into a swift directory.
I can certainly come up with something, but I believe that this is general issue (not just libdispatch), best dealt with at the CI level. |
What about if we add an environment variable that the CI sets that would cause us to error if we don't find it. (I.e. SWIFT_CI=1).
… On Oct 29, 2019, at 5:27 PM, Julian Lettner ***@***.***> wrote:
Hey J! Is there any way we could make it so that if this happens again, we get an error instead of silently not running the tests?
I can certainly come up with something, but I believe that this is general issue (not just libdispatch), best dealt with at the CI level.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I found and reported this issue, as I had periodically been running the tests locally since the beginning of the year and noticed these disabled tests when looking at prior test logs. I could have easily submitted this patch fix myself, but it wouldn't have been robust to any further moves in the libdispatch build directory. Since I got no response when I mentioned the regression on that libdispatch pull, I filed the bug so that the devs involved would actually discuss:
Without nailing those two details down, this is going to keep silently breaking, as mentioned by @gottesmm. |
I don't think that swift really needs to care about where the products go. Adjusting the path here to enable the tests first is a good approach. Subsequently, we should change the lit configuration to be substituted by CMake via |
Sounds good, that should fix it. |
Swift may not care where the products go, but corelibs-libdispatch is still putting them in a silly place. |
I'm happy to change them in a follow up change to use a different path for the modules. Right now, we have multiple layers of things working around limitations of previous approaches, and keeping everything working is difficult enough. I'm pretty close to migrating Foundation, which should help remove some of this technical debt in the setup and making it easier to relocate the swift modules. |
@swift-ci Please test macOS |
@gottesmm
@compnerd |
@swift-ci Please test |
Build failed |
Build failed |
@yln instead of using an environment variable or the like, I think @shahmishal would prefer to have some sort of variable set in lit. Can you also change the presets to set this variable as well? |
@swift-ci Please test |
Build failed |
Build failed |
17c99a0
to
58002a7
Compare
@swift-ci Please test Linux |
Build failed |
I removed my last 2 commits. I think wiring through CMake is the right solution. Once we have this maybe we can make building libdispatch mandatory on platforms that require it? The swift_ci env var/lit param seems very brittle. It is also a specific solution for a general problem. I think this should be handled at the CI/Jenkins level outside of the messiness of build-script. |
ping I would like to merge this so we start executing these tests on Linux again. The two attempted, specific fixes have their own set of issues. My current understanding is that all My hope is that "wiring through CMake" as compnerd suggested will lower the chance of silently disabling the libdispatch tests. I also want to re-iterate the my opinion that the "silent disabling of tests" is a general problem; it would be good to have a general solution: |
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.
Confirmed that this pull enables the libdispatch and tsan tests again by building with the 11/08 snapshot on Android. I agree that the larger issues can be fixed later.
Thanks @buttaface. And also thanks for bringing our attention to this in the first place. |
@yln, I think this broke a couple months ago again, likely because #38888 split up the build pipeline so that cmark/llvm/swift are built and tested first. The way it worked before was that all the |
The swift-corelibs-libdispatch project had its build directory layout
changed [1] which silently deactivated the libdispatch tests on Linux,
because we use hard-coded paths to look for the required libdispatch
artifacts. This change adapts the paths to the new layout.
Thanks to Jordan Rose for noticing and diagnosing this [2].
SR-11568
[2] https://bugs.swift.org/browse/SR-11568
[1] swiftlang/swift-corelibs-libdispatch#515