Repository navigation
Check the OpenVMM child's descriptors in the inheritance test - #572
Merged
Pedro Henrique Penna (ppenna) merged 1 commit intoOct 15, 2026
Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
Pedro Henrique Penna (ppenna) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only change removes the cross-test race without identified blocking issues.
0 open findings
What changed in this PR
Makes the Linux descriptor-inheritance test inspect the intended child directly, avoiding false failures caused by concurrent tests.
Changes:
- Replaces pipe EOF timeouts with
/proc/PID/fdinspection. - Preserves leak detection checks and child cleanup.
| File | Description |
|---|---|
nvx-rs/src/host/process.rs |
Updates the test helper and callers to check child descriptors directly. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
openvmm_inherits_no_descriptor_beyond_its_standard_streams makes a pipe writer inheritable while it spawns a child, then waited up to 2 s for the reader to reach end-of-file. A plain child that a concurrent test spawned in that window, such as the python3 child of a_process_runs_until_its_last_thread_exits, inherited the writer too and held the pipe open, so the test could fail although OpenVMM inherited nothing. Read the child's /proc/PID/fd instead and look for the planted pipe. Command::spawn returns once the child has executed its program, which closed its close-on-exec copies, so a copy that remains was inherited. The result no longer depends on other processes or a timeout, and the test takes milliseconds instead of more than 2 s. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/fix-descriptor-inheritance-test-race
branch
from
October 15, 2026 18:13
ac63212 to
58c9577
Compare
Pedro Henrique Penna (ppenna)
deleted the
agents/fix-descriptor-inheritance-test-race
branch
October 15, 2026 19:13
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
openvmm_inherits_no_descriptor_beyond_its_standard_streamscould fail even though OpenVMM inherits nothing.python3child ofa_process_runs_until_its_last_thread_exits./proc/PID/fdand looks for the planted pipe.Command::spawnreturns once the child has executed its program, which closes its close-on-exec copies, so any copy that remains was inherited. The result no longer depends on other processes or on a timeout, and the test takes milliseconds instead of more than 2 s.Only the test changes. I found this while investigating flaky guest tool tests in #528, which had the same kind of descriptor race. This test was never seen failing on its own, because a long-lived plain child has to start within a window of about a millisecond.
Validation
4927f941: everycheck-nvx-rsandcheck-aci-edge-sandboxescommand passed. That covers formatting, Clippy, tests with all and with default features, the bundled-artifact fixture, agent bundling, rustdoc, Rust 1.89, and the macOS cross-check.python3test, passed 100 runs, 10 at a time.