Skip to content

fix: exclude switch crate filesystem tests from Miri isolation - #1079

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/miri-ignore-switch-fs-tests-ea30a69a263b85c4
Jul 29, 2026
Merged

fix: exclude switch crate filesystem tests from Miri isolation#1079
norrietaylor merged 1 commit into
mainfrom
inbox-patch/miri-ignore-switch-fs-tests-ea30a69a263b85c4

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #1020
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABKmXtAg

The nightly-tests miri job aborted on the first switch test touching the filesystem: six resolver tests call tempfile::tempdir(), and mkdir is unsupported under Miri's default isolation, so Miri verified almost nothing before aborting on the second test. This annotates those six tests with #[cfg_attr(miri, ignore)], so Miri still covers the pure subnet/MAC/vsock primitives it was added to check (informed by #239); the tests run unchanged outside Miri. The issue also suggests refreshing the job comment in .github/workflows/nightly-tests.yml, but that path is frozen and CODEOWNER-gated per AGENTS.md, so it is left to a maintainer.

Verification

cargo fmt --all --check --manifest-path target/Cargo.toml — passed (no drift)
cargo clippy --workspace --locked --manifest-path target/Cargo.toml -- -D warnings — passed (no warnings)
cargo build --workspace --locked --manifest-path target/Cargo.toml — passed
cargo test --workspace --locked --manifest-path target/Cargo.toml — passed; switch: 12 passed, 0 ignored

Generated by inbox-patch ·

Note

Skip filesystem tests in the switch crate when running under Miri

Six resolver tests in lib.rs create real temp directories, which Miri cannot support due to lack of mkdir isolation. Each test is annotated with #[cfg_attr(miri, ignore)] so they are skipped automatically when the test suite runs under Miri.

Macroscope summarized ea43566.

The miri job in nightly-tests aborts on the first switch test that
touches the filesystem: tempfile::tempdir() calls mkdir, which is
unsupported under Miri's default isolation. Six resolver tests hit
this, so Miri verified almost nothing before aborting.

Annotate those six tests with #[cfg_attr(miri, ignore)] so Miri still
covers the pure subnet/MAC/vsock primitives it was added to check.
The tests run unchanged outside Miri.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb855d99-da4f-4790-8bb7-7b0dea1668ee

📥 Commits

Reviewing files that changed from the base of the PR and between a6c0e35 and ea43566.

📒 Files selected for processing (1)
  • crates/switch/src/lib.rs

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor marked this pull request as ready for review July 29, 2026 21:00
@norrietaylor
norrietaylor merged commit 5fca35a into main Jul 29, 2026
29 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/miri-ignore-switch-fs-tests-ea30a69a263b85c4 branch July 29, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

miri job aborts: switch tests call tempfile::tempdir() under Miri isolation

1 participant