Skip to content

[TSan] Deflake positive TSan+libdispatch test #25669

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

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

yln
Copy link
Contributor

@yln yln commented Jun 21, 2019

TSan does not guarantee the detection of races [1]. This means that any
positive test, i.e., a test that asserts the detection of a race, comes
with inherent flakiness. In the LLVM TSan test suite this unfortunate
circumstance is mitigated via the deflake utility [2] (plus lit
substitution) which executes a test multiple times.

Since we currently only have 3 positive TSan tests in the Swift test
suite [3] (the remaining ones test the absence of false positives), we
decided against bringing over this utility for now. Instead this change
attempts to "deflake" as part of the test itself.

[1] https://groups.google.com/d/msg/thread-sanitizer/KIok3F_b1oI/RwrMNhyHafwJ
[2] llvm/llvm-project@233f401
[3] Positive TSan tests:
test/Sanitizers/tsan.swift
test/Sanitizers/tsan-libdispatch.swift
validation-test/Sanitizers/tsan-inout.swift

rdar://51730684

TSan does not guarantee the detection of races [1].  This means that any
positive test, i.e., a test that asserts the detection of a race, comes
with inherent flakiness.  In the LLVM TSan test suite this unfortunate
circumstance is mitigated via the deflake utility [2] (plus lit
substitution) which executes a test multiple times.

Since we currently only have 3 positive TSan tests in the Swift test
suite [3] (the remaining ones test the absence of false positives), we
decided against bringing over this utility for now. Instead this change
attempts to "deflake" as part of the test itself.

[1] https://groups.google.com/d/msg/thread-sanitizer/KIok3F_b1oI/RwrMNhyHafwJ
[2] llvm/llvm-project@233f401
[3] Positive TSan tests:
  test/Sanitizers/tsan.swift
  test/Sanitizers/tsan-libdispatch.swift
  validation-test/Sanitizers/tsan-inout.swift

rdar://51730684
@yln
Copy link
Contributor Author

yln commented Jun 21, 2019

@kubamracek @delcypher
Please check my work and explanation.

@benlangmuir @gottesmm @jrose-apple
CC'd for awareness.

@yln
Copy link
Contributor Author

yln commented Jun 21, 2019

@swift-ci Please test

@yln yln merged commit f54ff7f into master Jun 24, 2019
@yln yln deleted the deflake-test-tsan-libdispatch branch June 24, 2019 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants