Commit 09e13d6
Fix parallel test race condition in lib.inc temp dir creation
tempnam(__DIR__, '.tmp') + unlink + mkdir has a TOCTOU window: after
unlink, another parallel worker's tempnam can claim the same name. With
all tests sharing __DIR__ (the run-tests --temp-source/target dir),
this reliably causes "File exists" collisions on Windows.
Use sys_get_temp_dir() + PID + uniqid() instead: these together make
collision impossible, so no retry loop is needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2d00d90 commit 09e13d6
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
0 commit comments