test(sandbox): bind ephemeral port in accepted loopback stream test - #3872
Merged
Merged
Conversation
The test reserved a loopback port, released it, and rebound it inside the workload. A concurrent nextest process could claim the port in between, failing the bind and surfacing only as a RecvError on the ready channel. Bind port 0 in the workload and send the assigned address instead, and report the workload error when the listener never becomes ready. Signed-off-by: Kris Hicks <khicks@nvidia.com>
krishicks
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 29, 2026 16:36
SDAChess
approved these changes
Sep 29, 2026
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.
Summary
Fix a flaky
openshell-sandboxunit test,network_broker::tests::accepted_loopback_stream_is_registered_for_notified_operations, which failed in CI withlistener ready: RecvError.Related Issue
No issue required: this is an obvious localized fix for a race in the test's port selection.
Changes
EADDRINUSE, which dropped the ready sender and showed up only as aRecvError.127.0.0.1:0and sends the assigned address over the ready channel. The broker's bind/listen path supports port 0, andgetsocknameis not intercepted.Testing
mise run pre-commitpassesThe test is Linux-only (seccomp) and was not run locally on macOS. CI covers it.
Checklist