-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[TSan] Add positive test for TSan + Dispatch on Linux #24756
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
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 is most certainly going to break windows. There is a community CI up now, you should be able to do a one-off run on there. Can you add notes to the tests that you marked as unsupported on Linux as to why they are unsupported?
@swift-ci Please test |
Build failed |
Build failed |
Ah, I missed that before. Can you give/point me to the instructions for doing this? |
@swift-ci Please test |
@gottesmm @jrose-apple |
Since @compnerd mentioned me in this pull request, I just did a clean build of this change using a unified (not |
Build failed |
@swift-ci Please test |
I just did a run of this on Windows and only the following test fails: Swift(windows-x86_64) :: IRGen/tsan_coroutines.swift |
@swift-ci Please test |
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.
Sorry to delay on this. This doesn't have to block merging, but I don't love %import-libdispatch
. What do you all think about adding these search paths unconditionally on Linux?
I feel the same. The reason for it being like this is that it affects a number of substitutions, e.g., |
@swift-ci Please test |
Force push to squash commit with uninteresting changes:
@swift-ci Please test |
@swift-ci Please test |
Build failed |
@swift-ci Please test |
Build failed |
@compnerd @gottesmm @jrose-apple The Swift test suite passes. One lldb test timed out. Can we land this?
|
@swift-ci Please test OS X platform |
1) Enable tests that use `import Dispatch` on Linux. Add substitution `%import-libdispatch` that needs to be used for all cross-platform tests (i.e., tests that are intended to be run on other platforms than Darwin) that do `import Dispatch` or enable thread sanitizer. 2) Make sure as many existing Dispatch and TSan tests as possible run on Linux. Mark tests that would require substantial work with `UNSUPPORTED: OS=linux-gnu`. 3) Add integration-style Swift test that shows that TSan finds a simple race when using `Dispatch.async` incorrectly. A more complete test suite for TSan's libdispatch support lives on the LLVM/compiler-rt side. rdar://problem/49177535
Wire libdispatch build path through CMake `build-script-impl -> lit.site.cfg.in -> lit.cfg` instead of computing it in lit.cfg.
@swift-ci Please test |
Rebased on top of master. |
@compnerd Can you take a final quick look at this? |
LGTM if @compnerd is cool. I just pinged him. |
Enable tests that use
import Dispatch
on Linux. Add substitution%import-libdispatch
that needs to be used for all cross-platformtests (i.e., tests that are intended to be run on other platforms
than Darwin) that do
import Dispatch
or enable thread sanitizer.Make sure as many existing Dispatch and TSan tests as possible run on
Linux. Mark tests that would require substantial work with
UNSUPPORTED: OS=linux-gnu
.Add integration-style Swift test that shows that TSan finds a simple
race when using
Dispatch.async
incorrectly. A more complete testsuite for TSan's libdispatch support lives on the LLVM/compiler-rt
side.
rdar://problem/49177535