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

fix and (re-)enable Miri cross-target checks on macOS and Windows #103569

Merged
merged 2 commits into from
Nov 7, 2022

Conversation

RalfJung
Copy link
Member

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Oct 26, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2022
@rust-log-analyzer

This comment has been minimized.

@Noratrieb
Copy link
Member

Wouldn't it make more sense to relax the sanity checks depending on the target instead of removing them entirely?

@RalfJung
Copy link
Member Author

These sanity checks make no sense for test src/tools/miri --target $TARGET, no matter the target. The sanity checks ensure that we can actually build code for that target with a C compiler, but when testing a target in Miri we don't build any code for the target, we just interpret it.

@Mark-Simulacrum
Copy link
Member

#103731 disables the cross-test to Windows -- I suspect this PR may actually fix the problem in any case for both macOS and Windows, and it's just coincidence that Windows appeared to work before.

// Some environments don't want or need these tools, such as when testing Miri.
if env::var_os("BOOTSTRAP_SKIP_TARGET_SANITY").is_some() {
continue;
}
Copy link
Member

Choose a reason for hiding this comment

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

There's other checks similar to this (e.g., the cmake check for msvc below). I think my recommendation would be to see if we can refactor the sanity checking as a whole so there's a x.py flag that disables it. I think skipping it entirely won't work today, but if we move some of the detection logic to config.rs that might fix it.

Copy link
Member Author

Choose a reason for hiding this comment

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

That will probably require more digging into x.py than I will have time for, unfortunately.

Copy link
Member

Choose a reason for hiding this comment

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

Alright. I can probably make an attempt to do that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added another check of BOOTSTRAP_SKIP_TARGET_SANITY to the second loop that iterates all targets, which could help in the interim. (When writing this PR I did not notice there are two such loops.)

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 29, 2022
@bors
Copy link
Contributor

bors commented Oct 30, 2022

☔ The latest upstream changes (presumably #103731) made this pull request unmergeable. Please resolve the merge conflicts.

@RalfJung RalfJung changed the title skip bootstrap target sanity checks when testing Miri fix and (re-)enable Miri cross-target checks on macOS and Windows Oct 31, 2022
@RalfJung
Copy link
Member Author

RalfJung commented Nov 5, 2022

@Mark-Simulacrum now that the release has gone through, do you think it'd make sense to merge this PR until someone has time to do the sanity check refactor you mentioned?

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Nov 7, 2022

r=me with a short comment on the env variable in bootstrap noting the desire for a refactor here (feel free to just point at this PR in terms of context/explanation)

@RalfJung
Copy link
Member Author

RalfJung commented Nov 7, 2022

@bors r=Mark-Simulacrum rollup=iffy

@bors
Copy link
Contributor

bors commented Nov 7, 2022

📌 Commit 397e5bb has been approved by Mark-Simulacrum

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 Nov 7, 2022
@bors
Copy link
Contributor

bors commented Nov 7, 2022

⌛ Testing commit 397e5bb with merge d69c33a...

@bors
Copy link
Contributor

bors commented Nov 7, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing d69c33a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 7, 2022
@bors bors merged commit d69c33a into rust-lang:master Nov 7, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d69c33a): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.7%, -0.6%] 2
Improvements ✅
(secondary)
-1.4% [-1.6%, -1.3%] 6
All ❌✅ (primary) -0.6% [-0.7%, -0.6%] 2

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.9% [0.5%, 1.3%] 2
Regressions ❌
(secondary)
6.6% [6.6%, 6.6%] 1
Improvements ✅
(primary)
-0.6% [-0.7%, -0.6%] 2
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) 0.1% [-0.7%, 1.3%] 4

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.5% [3.5%, 3.5%] 1
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-0.5%, -0.5%] 2

@Mark-Simulacrum
Copy link
Member

Delta here is pretty certainly noise, though it's also an improvement so either way fine.

@RalfJung RalfJung deleted the miri-test-macos branch November 11, 2022 17:53
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…ulacrum

fix and (re-)enable Miri cross-target checks on macOS and Windows

Fixes rust-lang#103519
r? `@Mark-Simulacrum`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Miri on macOS in CI
8 participants