fix: exclude switch crate filesystem tests from Miri isolation - #1079
Conversation
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>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 5 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
Fixes #1020
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABKmXtAg
The nightly-tests
mirijob aborted on the firstswitchtest touching the filesystem: six resolver tests calltempfile::tempdir(), andmkdiris 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
Note
Skip filesystem tests in the
switchcrate when running under MiriSix resolver tests in lib.rs create real temp directories, which Miri cannot support due to lack of
mkdirisolation. Each test is annotated with#[cfg_attr(miri, ignore)]so they are skipped automatically when the test suite runs under Miri.Macroscope summarized ea43566.