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

miri: make --stage 0 testing work #99599

Merged
merged 2 commits into from
Jul 23, 2022
Merged

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jul 22, 2022

This needs rust-lang/miri#2415 or it'll break Miri entirely.

also fixes #99589

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 22, 2022
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 22, 2022
@RalfJung RalfJung marked this pull request as draft July 22, 2022 12:27
src/bootstrap/test.rs Outdated Show resolved Hide resolved
// The stdlib we need might be at a different stage. And just asking for the
// sysroot does not seem to populate it, so we do that first.
builder.ensure(compile::Std::new(compiler_std, host));
let sysroot = builder.sysroot(compiler_std);
Copy link
Member Author

Choose a reason for hiding this comment

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

Is it expected that I need to call ensure and sysroot, i.e., that calling sysroot does not implicitly ensure anything?

Copy link
Member

@jyn514 jyn514 Jul 23, 2022

Choose a reason for hiding this comment

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

It ensures the directory exists. It doesn't build the standard library, a) because it doesn't know what target you want and b) because this is also called when building Std so we can copy the newly built artifacts into the sysroot, so building Std at that time would lead to a dependency cycle

@RalfJung RalfJung marked this pull request as ready for review July 22, 2022 13:54
@RalfJung RalfJung marked this pull request as draft July 22, 2022 13:54
@RalfJung
Copy link
Member Author

RalfJung commented Jul 22, 2022

Locally this seems to work. (Miri's tests then fail but that is due to another issue: #99605)

bors added a commit to rust-lang/miri that referenced this pull request Jul 22, 2022
support MIRI_HOST_SYSROOT env var for stage 0 builds

Together with a [patch on the rustc side](rust-lang/rust#99599), this makes `./x.py test src/tools/miri --stage 0` work again. :)

r? `@oli-obk`
@RalfJung RalfJung marked this pull request as ready for review July 22, 2022 16:19
@rustbot
Copy link
Collaborator

rustbot commented Jul 22, 2022

The Miri submodule was changed

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

The Miri side of this has landed, so this is ready.

@RalfJung
Copy link
Member Author

Oh funny, so we test this with debug assertions in the PR but not in main CI?

This is not a new issue in this PR, it already exists on master and will be fixed by #99607.

@RalfJung
Copy link
Member Author

@bors r+ p=1
to finally get a new Miri shipped with a nightly :D

@bors
Copy link
Contributor

bors commented Jul 22, 2022

📌 Commit 2564a08 has been approved by RalfJung

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2022
@bors
Copy link
Contributor

bors commented Jul 22, 2022

⌛ Testing commit 2564a08 with merge 0fc54ebf0a6dfe2c92ae6ebdc4ce00f63802b5ab...

@bors
Copy link
Contributor

bors commented Jul 22, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 22, 2022
@RalfJung
Copy link
Member Author

Uh... what? But this already fails on master, the PR doesn't make the assertions any worse...

... whatever, let's land #99607 first I guess.

@RalfJung
Copy link
Member Author

#99607 landed so this should work now.
@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2022
@bors
Copy link
Contributor

bors commented Jul 23, 2022

⌛ Testing commit 2564a08 with merge 7d0a55b...

@bors
Copy link
Contributor

bors commented Jul 23, 2022

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 7d0a55b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 23, 2022
@bors bors merged commit 7d0a55b into rust-lang:master Jul 23, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 23, 2022
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #99599!

Tested on commit 7d0a55b.
Direct link to PR: #99599

🎉 miri on windows: build-fail → test-pass (cc @RalfJung @oli-obk).
🎉 miri on linux: build-fail → test-pass (cc @RalfJung @oli-obk).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 23, 2022
Tested on commit rust-lang/rust@7d0a55b.
Direct link to PR: <rust-lang/rust#99599>

🎉 miri on windows: build-fail → test-pass (cc @RalfJung @oli-obk).
🎉 miri on linux: build-fail → test-pass (cc @RalfJung @oli-obk).
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7d0a55b): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.8% 2.8% 1
Improvements 🎉
(primary)
-2.7% -2.7% 1
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) -2.7% -2.7% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

@RalfJung RalfJung deleted the miri-stage-0 branch July 23, 2022 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

miri no longer builds after rust-lang/rust#99420
7 participants