mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 16:51:12 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user