Skip to content

miri-test-libstd: use --tests and update some comments#153722

Open
RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung:miri-test-benches
Open

miri-test-libstd: use --tests and update some comments#153722
RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung:miri-test-benches

Conversation

@RalfJung
Copy link
Member

@RalfJung RalfJung commented Mar 11, 2026

#153143 added ./x test --tests matching cargo --tests, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in library/alloctests/benches/vec_deque_append.rs.

Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some cfg_attr that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.

@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) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates

@Kobzol
Copy link
Member

Kobzol commented Mar 11, 2026

Makes sense. To avoid doctests, but also not to run examples or benchmarks, --tests is indeed what we want, I think. You can r=me once PR CI is green.

@RalfJung
Copy link
Member Author

@bors r=Kobzol

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 11, 2026

📌 Commit bc4dfa5 has been approved by Kobzol

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors bot 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 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 11, 2026
miri-test-libstd: use --tests and update some comments

rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.

Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 11, 2026
miri-test-libstd: use --tests and update some comments

rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.

Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 11, 2026
miri-test-libstd: use --tests and update some comments

rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.

Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
rust-bors bot pushed a commit that referenced this pull request Mar 11, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #152569 (Stop using rustc_layout_scalar_valid_range_* in rustc)
 - #153421 (Fix ICE in fn_delegation when child segment resolves to a trait)
 - #153571 (Avoid ICE when an EII declaration conflicts with a constructor)
 - #153581 (Simplify `type_of_opaque`.)
 - #153611 (interpret: go back to regular string interpolation for error messages)
 - #153635 (Unify same-span labels in move error diagnostics)
 - #153660 (mir-opt: Drop invalid debuginfos after SingleUseConsts.)
 - #153685 (Introduce `for_each_query_vtable!` to move more code out of query macros)
 - #153722 (miri-test-libstd: use --tests and update some comments)
 - #153671 (Make Enzyme has dependent on LLVM hash)
 - #153710 (remove `.ftl` checks from tidy)
 - #153720 (doc/rustc: clarify how to contact arm-maintainers)
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) T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants