History log of /php-src/ext/standard/tests/general_functions/proc_open_multiplex.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 2021a58a 25-Dec-2024 Christoph M. Becker

Reintroduce proc_open_multiplex.phpt (GH-17192)

The main intent of the test was to show the changed behavior on
Windows; previously, `stream_select()` would return immediately there,

Reintroduce proc_open_multiplex.phpt (GH-17192)

The main intent of the test was to show the changed behavior on
Windows; previously, `stream_select()` would return immediately there,
reporting all pipes as ready; now, it only returns if at least one pipe
is actually ready.

The original test case was overspecified; of course, we cannot assume
that the pipes are ready one after the other; depending on the concrete
`select(2)` implementation and the system scheduler, minor differences
are to be expected.

Thus we relax the test expectations, and now require that not all pipes
are reported ready after a single `stream_select()` call, and that the
output contains all strings. We also ensure that `stream_select()`
doesn't fail (for whatever reason). And in case of the test
expectations not being met, we also output some diagnostics (most
notably the output that has already been read).

show more ...