bench: surface the controller stderr when the harness cannot connect

A startup failure previously reported only cannot-connect with the
process stderr discarded - undiagnosable in CI.
This commit is contained in:
ScottW514
2026-08-14 19:10:38 -04:00
parent 9e9d03ba94
commit 26ed519348
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -167,7 +167,11 @@ def run_session(name, steps):
except OSError:
time.sleep(0.1)
if sock is None:
fail("[%s] cannot connect to the controller" % name)
err = b""
if proc.poll() is not None:
err = proc.stderr.read() or b""
fail("[%s] cannot connect to the controller (exit=%s)\n%s"
% (name, proc.poll(), err.decode(errors="replace")))
log = []
read_avail(sock, log, 0.5) # banner / hello