iotest: give the child 30 seconds to answer

In Haiku in QEMU, the child took more than the 5 seconds that the test
waited for its output once (the first start of the program). The loop
ends as soon as the output is there, so the test takes no longer where
the child starts quickly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUCocRdmh1id7SXNMg
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
This commit is contained in:
Neo-DesktopandClaude Opus 5.5 committed 2026-11-28 20:03:32 +00:00
1 parent ff81f272a1
commit a15f4258d5
1 file changed
+3 -2
+3 -2
View File
@@ -114,9 +114,10 @@ static void TestChild() {
if (!ok) return;
DWORD n;
CHECK(::WriteFile(inW, "at&f\r", 5, &n, NULL) && n == 5);
// Polled, as a program polls a helper's output without blocking.
// Polled, as a program polls a helper's output without blocking. The
// child can take some seconds to start in a virtual machine.
DWORD avail = 0;
for (int i = 0; i < 500 && avail < 5; i++) {
for (int i = 0; i < 3000 && avail < 5; i++) {
if (!::PeekNamedPipe(outR, NULL, 0, NULL, &avail, NULL)) break;
if (avail < 5) ::Sleep(10);
}