Skip to content

Fix order-dependent tests #21202

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
Dec 11, 2018

Conversation

beccadax
Copy link
Contributor

I’ve discovered several tests which break when standard library declarations are shuffled because the order of witnesses in SIL witnesss tables changes. As far as I can tell, these failures don’t actually indicate anything has broken; the tests are just too strict. This change loosens those tests a bit so they will pass no matter how we arrange declarations in the standard library.

Several tests only work when standard library declarations are listed in a certain order. This change weakens those tests enough to tolerate ordering changes.
@beccadax
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice confirmation that your tool is working.

@beccadax
Copy link
Contributor Author

@swift-ci please smoke test linux platform

@beccadax
Copy link
Contributor Author

Linux failure is in Foundation tests and this only changes our own test suite, so it's hard to see how they could be related.

@compnerd
Copy link
Member

Nice, this is something that I am hitting with a number of tests with the SIL Serialization during the Windows bring up. Perhaps we should always use -emit-sorted-sil?

@compnerd
Copy link
Member

@gottesmm had some opinions on the use of -emit-sorted-sil

@gottesmm
Copy link
Contributor

The problem with -emit-sorted-sil is that it is often times not needed and hides any problems around non-determinism in the compiler.

@beccadax
Copy link
Contributor Author

Feel free to keep discussing sorted output, but I think we want this test change regardless, so I'm going to merge this and move on to the next thing.

@beccadax beccadax merged commit a30c32d into swiftlang:master Dec 11, 2018
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.

4 participants