Skip to content

[5.1] Fix flaky Driver tests #28098

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

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Nov 6, 2019

Cherry-picks #27780, a test-only change, to swift-5.1-branch:

Several Driver tests create a hard link to the compiler in a temporary directory, then invoke it thorugh that hard link to see how it locates items in the resource directory. This pattern can tickle a system-load-dependent macOS bug involving invocations of freshly-created hard links, causing rare test failures in CI or on contributors’ machines.

This change avoids the OS bug by always copying instead of hard linking. We already fall back to copying on Windows, so all tests should pass with a copy anyway. Removing this workaround will be tracked by rdar://problem/53507844.

Fixes rdar://problem/56923217.

Several Driver tests create a hard link to the compiler in a temporary directory, then invoke it thorugh that hard link to see how it locates items in the resource directory. This pattern can tickle a system-load-dependent macOS bug involving invocations of freshly-created hard links, causing rare test failures in CI or on contributors’ machines.

This change avoids the OS bug by always copying instead of hard linking. We already fall back to copying on Windows, so all tests should pass with a copy anyway. Removing this workaround will be tracked by rdar://problem/53507844.
@beccadax beccadax requested a review from a team as a code owner November 6, 2019 00:55
@beccadax
Copy link
Contributor Author

beccadax commented Nov 6, 2019

@swift-ci please test

@beccadax beccadax requested a review from gottesmm November 6, 2019 01:20
@swift-ci
Copy link
Contributor

swift-ci commented Nov 6, 2019

Build failed
Swift Test Linux Platform
Git Sha - 29e9502

@beccadax
Copy link
Contributor Author

beccadax commented Nov 6, 2019

@swift-ci please test Linux platform

@beccadax beccadax merged commit 50a0403 into swiftlang:swift-5.1-branch Nov 8, 2019
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.

3 participants