Repository navigation
Commit d2b1dec
Update GH-9590 tests: fixing the fd_bigset limitation, not papering over it
These tests (arnaud-lb, GH-9602/80232de0e4b) verified that stream_select()
fails loudly and immediately once any watched descriptor exceeds
FD_SETSIZE, instead of silently dropping it from the fd_set and blocking
forever on a socket it can no longer see -- that was the real GH-9590
bug: a silently-dropped fd caused an indefinite, unexplained hang.
Our fd_bigset removes the cause of that bug on POSIX rather than just
detecting it: a descriptor past 1024 is no longer dropped, it's tracked
correctly. So the warning path these tests expected is now dead code
for this scenario, and running the tests unmodified exposed exactly
the failure mode they were designed to prevent: with nothing ever
written to the watched socket and no signal to stop it, `stream_select()`
now genuinely blocks on the (correctly-registered) high fd for the
full PHP_INT_MAX timeout instead of bailing out early, timing out CI
after 2 minutes per test on FreeBSD.
Updated both to assert the actual guarantee this PR provides: writing
to the paired socket and confirming stream_select() correctly reports
it as readable even past the old limit, with a finite timeout. Verified
manually against the patched build (posix_setrlimit's hard-limit-raise
via -1 fails as EPERM in this sandbox, so run-tests.php's own SKIPIF
skips them here, but the exact --FILE-- logic was run standalone with
an explicit hard limit and produces the new --EXPECT-- exactly).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 9df943c commit d2b1dec
2 files changed
Lines changed: 17 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments