Skip to content

test(e2e): gate the Linux-only port test helpers so non-Linux clippy is clean - #2785

Merged
yigitdot merged 1 commit into
mainfrom
claude/e2e-ports-tests-non-linux-96a8a8
Oct 30, 2026
Merged

yigitdot merged 1 commit into
mainfrom
claude/e2e-ports-tests-non-linux-96a8a8

Conversation

@yigitdot

Copy link
Copy Markdown
Contributor

On macOS (any non-Linux target), CARGO_BUILD_WARNINGS=deny cargo clippy --workspace --all-targets fails with three dead-code errors in crates/e2e/src/ports/tests.rs: EPHEMERAL_PICKS, node_style_listen, and the SocketAddr/TcpListener/socket2 imports. Their only users are the #[cfg(target_os = "linux")] tests from #2731, so off Linux they are unused and build.warnings = deny turns that into errors. Linux CI is unaffected, but the cargo-clippy pre-commit hook runs this command, so every local commit on macOS fails.

Fix: put #[cfg(target_os = "linux")] on those items and split the imports so the shared Ipv4Addr/UdpSocket stay ungated. The tests and their Linux behavior do not change.

Verified on macOS (aarch64-apple-darwin):

  • env CARGO_BUILD_WARNINGS=deny cargo clippy --workspace --all-targets passes, and the commit went through every pre-commit hook.
  • cargo fmt -- --check passes.
  • cargo nextest run -p decdn-e2e -E 'binary(decdn_e2e)': 49/49 pass, including the four ports tests that are not Linux-gated.
  • Not run: clippy for a Linux target. The x86_64-unknown-linux-gnu target is not installed, and decdn-e2e's C-building dependencies would need a cross toolchain. Linux CI's clippy job covers that case.

Unrelated, and not fixed here: on macOS, cargo clippy -p decdn-e2e --all-targets --features anvil-e2e -- -D warnings reports three clippy::large_futures errors in crates/e2e/tests/node_pull_pool_redeploy.rs (lines 197, 276, 364; 16384-byte futures). Linux CI's --all-features clippy run does not report them.

Unblocks #2672.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 30, 2026 22:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

main 991871e claude/e2e-ports-tes... e689356 +/-
77% 77% 0%
View coverage of the 3 most impacted files.
File main 991871e claude/e2e-ports-tes... e689356 +/-
crates/node/src...s/client/mod.rs 91% 91% 0%
crates/client/src/scheduler.rs 94% 95% +1%
crates/node/src/dht/publish.rs 78% 80% +2%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@yigitdot
yigitdot merged commit 3d95315 into main Oct 30, 2026
38 checks passed
@yigitdot
yigitdot deleted the claude/e2e-ports-tests-non-linux-96a8a8 branch October 30, 2026 22:41
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.

3 participants