Skip to content

test: restrict Linux shared-memory tests to Linux - #2860

Merged
slin1237 merged 1 commit into
mainfrom
alex/portable-shm-tests
Oct 7, 2026
Merged

slin1237 merged 1 commit into
mainfrom
alex/portable-shm-tests

Conversation

@hello-alexmcc

@hello-alexmcc hello-alexmcc commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Problem

Two shared-memory tests write directly to Linux’s /dev/shm and fail on macOS with No such file or directory before reaching their assertions.

Solution

Compile these two tests only on Linux. Their Linux execution and assertions remain intact, including failure when the expected shared-memory mount is unavailable. Portable multimodal tests continue to run on all platforms.

Changes

  • Add #[cfg(target_os = "linux")] to the servicer’s SHM fan-out test and the adapter’s SHM offset/unlink test.
  • No production behavior changes.

Test Plan

  • Reproduced both failures on macOS before the change.
  • cargo test -p engine-servicer -p engine-zmq-adapter --no-fail-fast — 170 servicer unit tests, 2 integration tests, and 73 adapter tests passed; 0 failures.
  • cargo clippy -p engine-servicer -p engine-zmq-adapter --all-targets -- -D warnings -A clippy::collapsible_match — passed. The sole lint exception is the existing test-helper warning fixed separately in test(engine-servicer): fix collapsible match lint in KV wire tests #2859.
  • cargo +nightly fmt --all and git diff --check — passed.
  • File hygiene pre-commit hooks — passed; Rust formatting and Clippy were run separately as above.

Validation ran on macOS; the two Linux-only tests require Linux CI for execution. Full-workspace gates have other pre-existing Linux-specific benchmark/test assumptions and were not rerun for this two-line change.

Checklist
  • cargo +nightly fmt passes
  • Full-workspace cargo clippy --all-targets --all-features -- -D warnings passes (scoped Clippy passed with the exception documented above)

Release note

The two Linux-only shared-memory tests compile only on Linux, so the servicer and adapter suites pass on other platforms too.

Numbers

metric before after setup
servicer + adapter tests failing on a non-Linux host 2 0 cargo test -p engine-servicer -p engine-zmq-adapter --no-fail-fast on macOS (245 tests; the two /dev/shm tests compiled out after); Linux unchanged

Signed-off-by: Alex McC <319643551+hello-alexmcc@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: d60812b4-e3ae-4e28-8430-edd6d9833863
📥 Commits

Reviewing files that changed from the base of the PR and between a191897 and 23395e9.

📒 Files selected for processing (2)
  • crates/engine_servicer/src/vllm/tests.rs
  • crates/engine_zmq_adapter/src/multimodal.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Tests
    • Shared-memory tests are now compiled only on Linux. Their assertions and behavior remain unchanged; these test updates do not change application functionality on any platform.

Walkthrough

Two shared-memory tests are now compiled only on Linux. Their test logic and assertions are unchanged.

Changes

Linux-only test gates

Layer / File(s) Summary
Gate shared-memory tests
crates/engine_servicer/src/vllm/tests.rs, crates/engine_zmq_adapter/src/multimodal.rs
Both shared-memory tests now use #[cfg(target_os = "linux")].

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 23395

Only the platform eligibility of two /dev/shm-dependent tests changes. No merge-blocking risk is established; the PR is mergeable with normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: restricting Linux shared-memory tests to Linux.
Description check ✅ Passed The description is directly related to the changeset. It explains the macOS failures, the Linux-only test configuration, validation results, and the absence of production behavior changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@slin1237
slin1237 merged commit 48a368f into main Oct 7, 2026
11 of 13 checks passed
@slin1237
slin1237 deleted the alex/portable-shm-tests branch October 7, 2026 20:37
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.

2 participants