Commit d668b2e
committed
fix: address Codex review round 2 on #27924
- run.ps1: read stdout async while reading stderr sync, instead of
ReadToEnd()-ing both sequentially - a process writing enough to the
stream read second to fill its pipe buffer before the first stream
closes would deadlock forever, since nothing drains the second
stream while blocked on the first. Reproduced locally with a test
program that only writes to stderr (15s hang), fixed, reverified
(completes immediately, no regression in the 4-test suite).
- run.ps1: use -cnotmatch instead of -notmatch for the expected-
substring check - -notmatch is case-insensitive by default in
PowerShell, making run.ps1 laxer than run.sh's case-sensitive `case`
pattern match and able to miss a diagnostics-wording regression that
only changes case. Reproduced (differently-cased substring wrongly
"matched"), fixed, reverified (mismatched case now fails, exact case
still passes, suite still 4/4).
- run.sh: guard `work=$(mktemp -d)` with `|| exit 1` - an unguarded
failure left $work empty, so exe="$work/$name.exe" silently became
"/name.exe" (filesystem root). Reproduced via WSL with TMPDIR
pointed at a nonexistent directory: the script proceeded, tried to
write test binaries to /gc_alloc.exe and /hello.exe, and the crash
test even produced a false PASS (wrong-reason nonzero exit) masking
the real failure. Fixed, reverified (script now exits 1 immediately
instead of limping along with a bogus work dir).
All from Codex, #27924 pullrequestreview-4767856781.1 parent 6bd7afb commit d668b2e
2 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | | - | |
| 82 | + | |
75 | 83 | | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments