Repository navigation
test(switch): gate bep_host socket tests under miri - #2165
Merged
norrietaylor merged 2 commits intoOct 12, 2026
Merged
norrietaylor merged 2 commits into
norrietaylor merged 2 commits into
Conversation
The stack-peer integration tests in bep_host bind real Unix sockets and create temp dirs. Miri's default isolation refuses mkdir and cannot interpret the socket syscalls, so the nightly miri lane fails in bep_host::tests. Gate each of the twenty socket-backed tests with #[cfg_attr(miri, ignore)], the pattern the subnet/MAC/vsock tests in lib.rs already use. The pure in-memory ARP/RST/UDP/delivery tests keep running under Miri unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Member
|
/review |
Contributor
|
Approved: no findings at Nothing to do. Clobber: none: |
the_real_probe_covers_the_whole_range binds real TCP sockets, which Miri's isolation refuses, so the run aborted there once the bep_host socket tests ahead of it were ignored. Gate it like them, and state the gating rule once at the top of the bep_host test module.
Member
|
/review |
norrietaylor
approved these changes
Oct 11, 2026
Member
There was a problem hiding this comment.
Approved on ARCH PASS at 88ece6b.
norrietaylor
deleted the
inbox-patch/fix/switch-miri-bep-host-gating-61b80dd991bd99da
branch
October 12, 2026 01:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABWepU6w
The
bep_hoststack-peer integration tests bind real Unix sockets and create temp dirs. Under the nightly Miri lane (cargo miri test -p switch), Miri's default isolation refusesmkdirand cannot interpret the socket syscalls, so the lane fails inbep_host::testsinstead of covering the primitives it was added to check.Each of the twenty socket-backed tests is now gated
#[cfg_attr(miri, ignore)]— the same pattern the subnet/MAC/vsock tests inlib.rsalready use.loopback::tests::the_real_probe_covers_the_whole_rangeis gated the same way: it binds real TCP sockets, which Miri's isolation refuses, and it is the test the run aborted on beforebep_hostlanded. The pure in-memory ARP/RST/UDP/delivery tests inbep_hostkeep running under Miri unchanged, so the lane still covers them.Verification
cargo fmt --all --check --manifest-path target/Cargo.toml— pass, no driftcargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings— pass, no warningscargo test --locked --manifest-path target/Cargo.toml -p switch— 61 passed, 0 failed, 0 ignored (all tests still run off the miri cfg)RUSTFLAGS="--cfg miri" cargo test --locked --manifest-path target/Cargo.toml -p switch— 33 passed, 0 failed, 28 ignored: the 20 newly gatedbep_hosttests, the gatedloopbackreal-probe test, and the 7 pre-existinglib.rsgates are skipped under the miri cfg, and the pure tests still runjust miri(cargo +nightly miri test -p switch) on a macOS arm64 host, at 88ece6b —test result: ok. 33 passed; 0 failed; 28 ignored. This is real Miri, so the 33 ungated tests (bep_hostin-memory,loopbackinjected-binder,refusal,lib.rs) are interpreted clean under isolation.The nightly Miri lane runs on Linux, so its next scheduled run remains the proof for that target.
Summary by CodeRabbit