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

x.py test mir-opt --bless does not bless some tests #122292

Closed
RalfJung opened this issue Mar 10, 2024 · 1 comment · Fixed by #122295
Closed

x.py test mir-opt --bless does not bless some tests #122292

RalfJung opened this issue Mar 10, 2024 · 1 comment · Fixed by #122295
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Mar 10, 2024

To reproduce, simply edit the file tests/mir-opt/pre-codegen/checked_ops.checked_shl.PreCodegen.after.mir and then run x.py test mir-opt --bless. I'd expect the file to be changed back, but actually it is left unchanged.

Interestingly, x.py test mir-opt does check that file. This is on a x86-64 host, and the test is marked needs-unwind and only-x86_64. --bless adds a bunch of extra targets to bless, seems like my default target x86_64 with unwinding is not one of them though?

--bless should make sure to always bless the configuration that is tested without --bless.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 10, 2024
@Nadrieril

This comment was marked as outdated.

@Nadrieril Nadrieril added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 10, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2024
…et, r=Mark-Simulacrum

mir-opt: always run tests for the current target

Currently, `./x.py test tests/mir-opt` runs only the tests for the current target, and `./x.py test tests/mir-opt --bless` runs tests for a representative set of targets. That representative set does not include the current target however, which means `--bless` can succeed when tests fail without it. This PR ensures we run the current target always.

Fixes rust-lang#122292
cc `@RalfJung`
@bors bors closed this as completed in ea07456 Mar 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 17, 2024
Rollup merge of rust-lang#122295 - Nadrieril:mir-opt-run-current-target, r=Mark-Simulacrum

mir-opt: always run tests for the current target

Currently, `./x.py test tests/mir-opt` runs only the tests for the current target, and `./x.py test tests/mir-opt --bless` runs tests for a representative set of targets. That representative set does not include the current target however, which means `--bless` can succeed when tests fail without it. This PR ensures we run the current target always.

Fixes rust-lang#122292
cc ``@RalfJung``
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 C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
3 participants