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

mir-opt: always run tests for the current target #122295

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

Nadrieril
Copy link
Member

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 #122292
cc @RalfJung

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 10, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2024

📌 Commit 222bdad 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 Mar 16, 2024
@saethlin
Copy link
Member

saethlin commented Mar 16, 2024

I do not think this fixes the issue in question. If the host is not x86_64 with unwinding, the test in question is still not going to be blessed (aarch64 with unwinding is an increasingly common development platform, we really should not ignore it).

@Nadrieril
Copy link
Member Author

Nadrieril commented Mar 16, 2024

Hm, it fixes the inconsistency between bless and not bless, but indeed it doesn't ensure we bless all the mir-opt tests that can come up in CI. Should we also add more target to the bless list?

@saethlin
Copy link
Member

If we must change the bless list, I'd prefer that we change which targets are used so that we do not have any test output files that go un-blessed.

But in this case specific case, I wonder if we get the test in question blessed by changing its only-x86_64 to only-64bit. Or just delete that only- clause entirely. A handful of the mir-opt tests were pasted in from codegen tests and it seems highly likely that we just forgot to remove attributes that don't matter at the MIR level.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request 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`
@RalfJung
Copy link
Member

But in this case specific case, I wonder if we get the test in question blessed by changing its only-x86_64 to only-64bit. Or just delete that only- clause entirely. A handful of the mir-opt tests were pasted in from codegen tests and it seems highly likely that we just forgot to remove attributes that don't matter at the MIR level.

Yeah I suspect it could be only-64bit. I asked about that in the PR that added the test but got no reply so far.

But either way I think this PR is still valuable, we should ensure we always bless at least the target that gets tested without --bless; results are just too confusing if we don't do that.

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 17, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#119411 (Add as_(mut_)ptr and as_(mut_)slice to raw array pointers)
 - rust-lang#122248 (Respect stage0 sysroot when compiling rmake.rs with COMPILETEST_FORCE_STAGE0)
 - rust-lang#122295 (mir-opt: always run tests for the current target)
 - rust-lang#122574 (Register LLVM handlers for bad-alloc / OOM)
 - rust-lang#122608 (Move check-cfg diagnostic logic into a separate file)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ea07456 into rust-lang:master Mar 17, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request 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``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 17, 2024
…=Nadrieril

Remove some only- clauses from mir-opt tests

Derived from rust-lang#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 17, 2024
…=Nadrieril

Remove some only- clauses from mir-opt tests

Derived from rust-lang#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2024
…adrieril

Remove some only- clauses from mir-opt tests

Derived from rust-lang#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2024
…adrieril

Remove some only- clauses from mir-opt tests

Derived from rust-lang#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
@Nadrieril Nadrieril deleted the mir-opt-run-current-target branch March 19, 2024 22:51
bors added a commit to rust-lang/miri that referenced this pull request Mar 22, 2024
Remove some only- clauses from mir-opt tests

Derived from rust-lang/rust#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Apr 7, 2024
Remove some only- clauses from mir-opt tests

Derived from rust-lang/rust#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
Remove some only- clauses from mir-opt tests

Derived from rust-lang/rust#122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

x.py test mir-opt --bless does not bless some tests
6 participants