Skip to content

std: use skip_missing_miri_shims to control when tests should be skipped in Miri due to missing shims - #165117

Open
RalfJung wants to merge 4 commits into
rust-lang:mainfrom
RalfJung:skip_missing_miri_shims
Open

RalfJung wants to merge 4 commits into
rust-lang:mainfrom
RalfJung:skip_missing_miri_shims

Conversation

@RalfJung

@RalfJung RalfJung commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

View all comments

See prior discussion on Zulip.
Docs PR: rust-lang/std-dev-guide#86

Entirely remove testing on Windows, there is just too much we don't support there.
Also don't run std doc tests any more as there is no way to disable all doctests in a module, and marking every single test is too tedious IMO.

r? @tgross35
try-job: test-x86_64-gnu-aux

@rustbot

rustbot commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Any special-casing of Miri in the standard library requires review.

cc @rust-lang/miri

@rustbot rustbot added O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like 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 Oct 29, 2026
@rustbot

rustbot commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@RalfJung

Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
std: use skip_missing_miri_shims to control when tests should be skipped in Miri due to missing shims

try-job: test-x86_64-gnu-aux
@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 43cd0c6 to ce7f68a Compare October 29, 2026 10:07
@tgross35

Copy link
Copy Markdown
Member

I'm pretty okay with this, @rust-lang/libs-ping any thoughts? See the Zulip discussion linked in the top post for context

@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: ea60bf0 (ea60bf0be95c912404a2821f1c21a97850d94d6e)
Base parent: ce37c4f (ce37c4ff837c5c5dc45cddf9e1e3704e42ca67ea)

@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from ce7f68a to 4d659d1 Compare October 31, 2026 10:22
@rustbot

This comment has been minimized.

@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 4d659d1 to f08ee20 Compare October 31, 2026 10:27
/// Converts a `BorrowedFd` into a reference to a file-like type.
///
#[cfg_attr(all(unix, not(miri)), doc = "```")]
#[cfg_attr(unix, doc = "```")]

@RalfJung RalfJung Oct 31, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I screwed this up in #164963...

View changes since the review

@rust-log-analyzer

This comment has been minimized.

@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from f08ee20 to 5439f19 Compare October 31, 2026 12:14
@rustbot rustbot added A-CI Area: Our Github Actions CI 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 31, 2026
@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 5439f19 to 3aee2ea Compare October 31, 2026 12:14
@rust-bors

This comment has been minimized.

@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 3aee2ea to 573f710 Compare November 2, 2026 21:41
@rustbot

This comment has been minimized.

@RalfJung

RalfJung commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

I'm pretty okay with this, @rust-lang/libs-ping any thoughts? See the Zulip discussion linked in the top post for context

It's been a week -- seems like nobody has major concerns?

@rustbot rustbot added A-filesystem Area: `std::fs` A-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) A-networking Area: `std::net` A-process Area: `std::process` (note: `std::env` is A-env) O-windows Operating system: Windows labels Nov 7, 2026
@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 11aad14 to 81bd738 Compare November 7, 2026 15:07
@rustbot

This comment has been minimized.

@RalfJung

RalfJung commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

I added Windows-specific cfg as well so we can continue testing a good part of std under Windows.
@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 7, 2026
std: use skip_missing_miri_shims to control when tests should be skipped in Miri due to missing shims

try-job: test-x86_64-gnu-aux
@rust-bors

rust-bors Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 3a29ce2 (3a29ce26b6050c542ee6f48174502aec03c96fe2)
Base parent: e30d778 (e30d778f3029b78bb9c2e0dbe11a3b7389b652c4)

@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 81bd738 to 1009d49 Compare November 7, 2026 18:56
@rustbot

rustbot commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

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.

@RalfJung

RalfJung commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

And with the latest Miri update, the tests in library/std/src/sys/io/kernel_copy/linux/tests.rs should pass. :)
@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 7, 2026
std: use skip_missing_miri_shims to control when tests should be skipped in Miri due to missing shims

try-job: test-x86_64-gnu-aux
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2026
@rust-bors

This comment was marked as outdated.

@rust-log-analyzer

This comment was marked as outdated.

@RalfJung

RalfJung commented Nov 7, 2026 •

Copy link
Copy Markdown
Member Author

Strange, I ran these out-of-tree... but maybe that did not run the benchmarks.

Let's leave the kernel_copy stuff to a future PR.

@RalfJung
RalfJung force-pushed the skip_missing_miri_shims branch from 1009d49 to 2fea62f Compare November 7, 2026 21:58
@RalfJung

RalfJung commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Ah no I figured out what's happening... the test assumes that a single write call will write all its data, but Miri randomizes that.

@RalfJung

RalfJung commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

rust-bors Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Trying commit 79e05f8 with merge 008a6fd…

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/42419319262

rust-bors Bot pushed a commit that referenced this pull request Nov 7, 2026
std: use skip_missing_miri_shims to control when tests should be skipped in Miri due to missing shims

try-job: test-x86_64-gnu-aux

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-filesystem Area: `std::fs` A-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) A-networking Area: `std::net` A-process Area: `std::process` (note: `std::env` is A-env) A-testsuite Area: The testsuite used to check the correctness of rustc O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like O-windows Operating system: Windows S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. 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