Event loop: what is due called when waiting fails; units on Windows

looponce() called nothing due when waiting for the sockets failed,
returning at once: a caller waiting for a timer turned forever. What is
due is called all the same, and on Windows WSAEINTR is no failure, not
errno. looptest reports any failure to wait with its error; fibertest
starts Winsock, its loop could not be made without, and recurses into
half of a fiber's stack rather than most of it, which Windows takes
more of. The units case shows what a test which never finished wrote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-24 22:03:20 +03:00
1 parent 4e1455b419
commit 30f6043160
4 files changed
+54 -17

No files matched your search

+4 -2
View File
@@ -18,8 +18,10 @@ def run(t):
try:
done = subprocess.run([path, seed], stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, timeout=120)
except subprocess.TimeoutExpired:
t.fail(f"{unit} {seed} finishes")
except subprocess.TimeoutExpired as exc:
out = (exc.output or b"").decode(errors="replace")
t.fail(f"{unit} {seed} finishes",
actual="last: " + (out.splitlines() or ["nothing"])[-1])
continue
out = done.stdout.decode(errors="replace")
for line in out.splitlines():