From 26ed519348038555d48d664273e8d7af4ed743cc Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Fri, 14 Aug 2026 19:10:38 -0400 Subject: [PATCH] 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. --- scripts/bench/laser_lifecycle_test.py | 6 +++++- scripts/bench/laser_stream_test.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/bench/laser_lifecycle_test.py b/scripts/bench/laser_lifecycle_test.py index 1802fc3..3fe2ac4 100644 --- a/scripts/bench/laser_lifecycle_test.py +++ b/scripts/bench/laser_lifecycle_test.py @@ -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) diff --git a/scripts/bench/laser_stream_test.py b/scripts/bench/laser_stream_test.py index e36f9e5..160aab1 100644 --- a/scripts/bench/laser_stream_test.py +++ b/scripts/bench/laser_stream_test.py @@ -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