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
@@ -151,7 +151,11 @@ class Session:
return s
except OSError:
time.sleep(0.1)
fail("[%s] cannot connect to the controller" % self.name)
err = b""
if self.proc.poll() is not None:
err = self.proc.stderr.read() or b""
fail("[%s] cannot connect to the controller (exit=%s)\n%s"
% (self.name, self.proc.poll(), err.decode(errors="replace")))
def armed_count(self):
return "".join(self.log).count(ARMED)