Skip to content

[test] rth: Use dynamic linking to properly test backwards-deployment #14447

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
Feb 9, 2018

Conversation

jrose-apple
Copy link
Contributor

The added test worked before as well; it's to make sure I didn't break the existing behavior.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@lplarson
Copy link
Contributor

lplarson commented Feb 7, 2018

Would you elaborate a bit on how this properly tests resilience over the previous method?

@jrose-apple
Copy link
Contributor Author

The old version of rth would statically link a "new" client with an "old" library, but that can lead to missing symbol errors if something was added to the "new" library. The client should be able to weakly reference any new symbols, but ld still checks that they're present at link-time.

Swift doesn't actually try to weak-link anything that wasn't imported from Clang, so I don't have a test case yet. But it's one of the things I'm working on that I took over from Slava, rdar://problem/29888071.

Anyway, the purpose of resilience is to allow changing out a library after a client has been built, and that includes linking. This is closer to what actually happens when backwards-deploying an app on an older OS, or updating an OS out from under existing apps.

@jrose-apple
Copy link
Contributor Author

"It wasn't wrong but it could be more right."

@lplarson
Copy link
Contributor

lplarson commented Feb 7, 2018

Thanks! LGTM.

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8f34506f4fb5a3b48c8106053cfd5677607ae397

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - 8f34506f4fb5a3b48c8106053cfd5677607ae397

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8f34506f4fb5a3b48c8106053cfd5677607ae397

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - eb2c6e64f0418fee67ab4c77f2e4e1faec360dca

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - eb2c6e64f0418fee67ab4c77f2e4e1faec360dca

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - 0a15c759176ca2df1f00420966012712b2e7f6d1

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - 0a15c759176ca2df1f00420966012712b2e7f6d1

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - 0a15c759176ca2df1f00420966012712b2e7f6d1

@jrose-apple
Copy link
Contributor Author

I cannot catch a break with this rewrite. Guess I need to stop cutting corners. :-/

@jrose-apple
Copy link
Contributor Author

I finally got it working on all platforms. A bunch of things have changed if you want to take a look again, @lplarson.

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - b4cf5fdb9938a2d818bf9bcc0b92061d14188175

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2018

Build failed
Swift Test OS X Platform
Git Sha - b4cf5fdb9938a2d818bf9bcc0b92061d14188175

@lplarson
Copy link
Contributor

lplarson commented Feb 8, 2018

LGTM.

@jrose-apple
Copy link
Contributor Author

Dang it, Linux.

The added test worked before as well; it's to make sure I didn't break
the existing behavior.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2018

Build failed
Swift Test OS X Platform
Git Sha - 424c3be2062be4a3f05ea83a1bb0dad601f66ff5

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - 424c3be2062be4a3f05ea83a1bb0dad601f66ff5

@jrose-apple jrose-apple merged commit f9299e7 into swiftlang:master Feb 9, 2018
@jrose-apple jrose-apple deleted the give-rth-teeth branch February 9, 2018 01:14
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