Stabilize pipe process stdin round-trip test#14013
Conversation
|
@codex review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff8179109e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else { | ||
| shell_command(&split_stdout_stderr_command()) | ||
| }; | ||
| let (program, args) = shell_command(&split_stdout_stderr_command()); |
There was a problem hiding this comment.
Disable cmd AutoRun when asserting exact split output
This test now routes Windows through shell_command, which invokes cmd.exe /C without /D. cmd can execute AutoRun scripts, which may emit extra stdout/stderr and break the exact assert_eq! checks for split-out/split-err, creating environment-dependent flakes. The prior Windows path avoided cmd entirely.
Useful? React with 👍 / 👎.
What changed
python -cfor the round-trip assertion and instead run a nativecmd.exepipeline that reads one line from stdin withset /pand echoes it backon Windows so the stdin payload matches the platform-native line ending the shell reader expectsWhy this fixes flakiness
The failing branch-local flake was not in
spawn_pipe_processitself. The child exited cleanly, but the Windows ARM runner sometimes produced an empty stdout string when the test used Python as the stdin consumer. That makes the test sensitive to Python startup and stdin-close timing rather than the pipe primitive we actually want to validate. Switching the Windows path to a nativecmd.exereader keeps the assertion focused on our pipe behavior: bytes written to stdin should come back on stdout before EOF closes the process. The explicitwrite removes line-ending ambiguity on Windows.Scope