From 793081277cb46143e3ccd80ae1d868febacf3fbd Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 23:28:06 -0300 Subject: test/soak.py: a box ssh that stalls is no session's death: whether the session lives is asked again (three times), and the harness goes on (a 20-minute box run ended at 14 min on one `kill -0` over ssh that took more than 30 s) Co-Authored-By: Claude Opus 5.5 --- test/soak.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/soak.py b/test/soak.py index 01e29db4..e3ff18c7 100644 --- a/test/soak.py +++ b/test/soak.py @@ -1031,8 +1031,16 @@ class BoxRun(Run): time.sleep(1) def session_alive(self): - got = self.box(f'kill -0 {self.session_pid} 2>/dev/null && echo yes || echo no', timeout=30) - return got.stdout.strip() == b'yes' + # An ssh that stalls (the box's link, 30 s once in a 20-minute run) is no session's + # death: ask again, and only a no is one (a box gone for good fails the next checks) + for _ in range(3): + try: + got = self.box(f'kill -0 {self.session_pid} 2>/dev/null && echo yes || echo no', timeout=30) + except subprocess.TimeoutExpired: + self.note('harness: the box took 30 s to say whether the session lives; asking again') + continue + return got.stdout.strip() == b'yes' + return True def session_said(self): got = self.box(f'cat {self.home}/session.err.*; ls {self.home}/cores/*.core {self.home}/work/*.core 2>/dev/null; cat {self.home}/config/pardes/crashes 2>/dev/null', timeout=60) -- cgit v1.3