Run mir-opt panic=abort tests on CI - #160200
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
|
cf. #154607 |
| let panic_abort_target = builder | ||
| .ensure(MirOptPanicAbortSyntheticTarget { compiler: self.compiler, base: self.target }); | ||
| run(panic_abort_target); |
There was a problem hiding this comment.
Question: hm, could we have this show up in a step resolution snapshot?
There was a problem hiding this comment.
We have it shown in the step snapshot tests. Do you want to separate it so that instead of running mir-opt directly within the step, we generate two steps, one without mir-opt and another with mir-opt? And when blessing, we move the generation of additional steps to make_run?
|
I don't know nearly enough about bootstrap to review this.^^ |
| // Now also run the tests for the host with panic=abort | ||
| let panic_abort_target = builder | ||
| .ensure(MirOptPanicAbortSyntheticTarget { compiler: self.compiler, base: self.target }); | ||
| run(panic_abort_target); |
There was a problem hiding this comment.
This will be redundant with --bless I think?
mir-opt --bless already takes very long due to all the sysroots it is building, I'd prefer it not to become even slower.
There was a problem hiding this comment.
It is only redundant if the host target matches the hardcoded targets we have below. I can add an if condition to skip them if they match the host target.
That being said, if the stdlib it built, re-running the tests again should be very fast, they will just be ignored.
There was a problem hiding this comment.
It is always redundant. There are only 4 actually distinct configurations, so running more than 4 targets on --bless is redundant.
There was a problem hiding this comment.
I see, so the target doesn't really matter, the only thing that matters is bitwidth and the panic strategy? Yeah, in that case I will try to optimize it to always run 2 targets when not blessing, and 4 targets when blessing.
There was a problem hiding this comment.
Yeah.
When checking it's good to check the actual self.target to ensure CI covers them all. But in principle only the bitwidth and panic strategy should matter.
|
Cc @saethlin |
|
The existing behavior of
And only run the first two steps for non-bless mode. That'd be nice. |
This comment has been minimized.
This comment has been minimized.
But when we do the check, we should test all 4 combinations, right? Otherwise we could get back into the same problem, where some of the combinations are not checked on CI, and thus bless becomes "dirty". |
|
We are running mir-opt tests on all tier 1 targets, right? So 32bit and 64bit are both covered.
|
|
Ah, I see, makes sense. Thanks. |
a65622e to
b63868d
Compare
This comment has been minimized.
This comment has been minimized.
|
Ok, I refactored the whole thing. Now when checking, we run the current target, and then the current target with the "inverted" panic strategy. And when blessing, we run the current target + four fixed targets, as before (there was a comment saying that running also the current target when blessing is desired). It is now possible to create synthetic targets with both panic abort/unwind strategies, and the generated miropt test steps are now created as separate step instances, which means that they will be more explicit tin the step trace, and they will also be properly cached. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hmm, the aarch64 mir-opt abort tests are failing on CI on AArch64, even though all the 4 "pinned" variants have been blessed locally. If the targets tested on CI with panic-abort won't pass the mir-opt tests, then the mechanism for blessing with 4 hardcoded targets won't work anymore :/ @RalfJung I'm also having trouble actually reblessing the Windows tests locally, uhh. |
|
This looks like something with endianess? But that should have already been a problem before?
|
|
In that case we will likely need a new axis, that also takes endianness into account? We never ran aarch64 panic=abort on CI before, this PR adds that, and it fails. |
|
Is this aarch64 le or be? We surely ran aarch64 before...?
|
|
It should be little endian, but before this PR, we never ran its panic=abort mir-opt tests on CI. It looks like it has different output than the 64-bit panic=abort target that we bless. |
|
That would be odd, both have the same endianess.
|
|
Hmm, I can't reproduce it locally on |
|
The job config has rust/compiler/rustc_middle/src/ty/mod.rs Line 1706 in 52d0866 🤷 seems like a pretty basic conflict between using randomize-layout and dumping the contents of every allocation into the diff. |
|
Would you be ok with just disabling layout randomization for the mir opt tests? |
IINM, that only turns off layout randomization for the non-std test portion, but not the already-built standard library which was already influenced by layout randomization? Or do you mean for the whole job? Some approaches I can think of:
Not sure if there's other viable approaches because none of them seem ideal... |
|
Hmm, I meant only the mir-opt tests, I didn't realize that std would be affected by that. Though we can build stdlib without layout randomization only for the mir-opt tests, maybe? |
Hm... maybe. I think with our existing handling, that has to invalidate all steps depending on built std? Since stage 1 std built with versus without randomize-layouts is incompatible, so that has to invalidate all steps depending on stage 1 std. It'd probably have to look like 2 separate If we only tested up to stage 1 {rustc,std} that'd be fine, except I think this would need to rebuild stage 1 std => stage 2 rustc. Which, probably is not that bad time-wise? |
|
Yes, this is the usual issue that codegen tests require a separate sysroot, not whatever hodgepodge of settings is configured in bootstrap.toml. |
8a2d0f7 to
d328e8e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
In the codegen(-llvm) tests the answer for this is just to add to the test. Maybe we just need to do that for these mir-opt tests that show layouts too? |
And only include the target name when rendering test metadata, to avoid including filenames in it.
… of targets to check
d328e8e to
c833721
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Ok, seems like that has helped, thank you! @rustbot ready |
View all comments
Context: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Blessing.20mir-opt.20on.20a.20clean.20checkout.20produces.20a.20diff/near/613465816
It looks like we didn't run them on CI (ever? lol).
r? @RalfJung