Skip to content
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

Conditionalize 'num_extra_inhabitants' in 64 bit platforms's tests #33136

Merged

Conversation

augusto2112
Copy link
Contributor

Quoting @tbkka: The number of extra inhabitants actually depends to some extent on the OS. Apple platforms reserve a 4GB "page zero" on 64 bit platforms in order to help detect 32/64 bit errors. [...] But Linux only reserves a 4K page zero, so there are only 4096 invalid pointer values.

This PR adds variables num_extra_inhabitants, num_extra_inhabitants_minus_1, num_extra_inhabitants_minus_2 and num_extra_inhabitants_minus_3, with the proper platform's values, and replaces the usages of those raw values by the variables.

It also enables the tests under Linux which are now working thanks to these changes and #32339.

@augusto2112
Copy link
Contributor Author

@vedantk @adrian-prantl In this PR I only substituted the raw values by the new variables in the tests that are passing on Linux. I can also do that to the tests which are not passing. I think that'd be better, so we don't have 2 different ways to refer to the 64-bit num_extra_inhabitants inside the tests. Should I do that here?

@adrian-prantl
Copy link
Contributor

If I understand your question correctly, I would prefer to update all tests at once, even the ones currently not running.

@augusto2112 augusto2112 force-pushed the variable-num-extra-inhabitants branch from ce80a1c to b3cb548 Compare July 27, 2020 19:56
@augusto2112
Copy link
Contributor Author

@adrian-prantl Ok, pushed!

@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ce80a1cb7d9100786b9d8d7e10da3542fecc36b8

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ce80a1cb7d9100786b9d8d7e10da3542fecc36b8

@augusto2112 augusto2112 force-pushed the variable-num-extra-inhabitants branch from b3cb548 to 17baf3f Compare July 27, 2020 23:13
@augusto2112 augusto2112 requested a review from vedantk July 27, 2020 23:13
@augusto2112 augusto2112 force-pushed the variable-num-extra-inhabitants branch from 17baf3f to 1e0e044 Compare July 27, 2020 23:15
@vedantk
Copy link
Contributor

vedantk commented Jul 28, 2020

@swift-ci smoke test

@augusto2112 augusto2112 force-pushed the variable-num-extra-inhabitants branch from 1e0e044 to 4051e11 Compare July 28, 2020 19:15
@vedantk
Copy link
Contributor

vedantk commented Jul 28, 2020

@swift-ci smoke test

@augusto2112 augusto2112 force-pushed the variable-num-extra-inhabitants branch from 4051e11 to 39f958e Compare July 28, 2020 21:01
@vedantk
Copy link
Contributor

vedantk commented Jul 28, 2020

@swift-ci smoke test

@augusto2112
Copy link
Contributor Author

It looks like it failed to build SwiftPM:

/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-master/swiftpm/Tests/PackageLoadingTests/PD4LoadingTests.swift:304: error: PackageDescription4LoadingTests.testUnavailableAPIs : XCTAssertTrue failed - /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-master/tmp/TemporaryFile.zaq0aq.swift:5:9: error: 'package(url:version:)' is unavailable: use package(url:_:) with the .exact(Version) initializer instead

Should I just rebase on top of current master?

@tbkka
Copy link
Contributor

tbkka commented Jul 29, 2020

Should I just rebase on top of current master?

You don't necessarily need to rebase. You could also just merge current master.

Either way, it's a good idea to do one or the other every week or so to make sure that your work is correctly tracking ongoing changes there. That will make it easier to merge your work back into master when it's ready.

@augusto2112 augusto2112 force-pushed the variable-num-extra-inhabitants branch from 39f958e to f72c322 Compare July 29, 2020 16:31
@vedantk
Copy link
Contributor

vedantk commented Jul 29, 2020

@swift-ci smoke test

@vedantk
Copy link
Contributor

vedantk commented Jul 29, 2020

@swift-ci smoke test OS X platform

@vedantk vedantk merged commit a6e2f8b into swiftlang:master Jul 30, 2020
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.

5 participants