summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 23:28:06 -0300
committerGabriel Schneider <[email protected]>2026-10-30 23:28:06 -0300
commit793081277cb46143e3ccd80ae1d868febacf3fbd (patch)
tree26cfae69d99fcf5a2b503c18b5aab45a3ce83a1a
parentc2ddcb39ac6f80e41aaee0bbbe311cd3ef9d6639 (diff)
downloadpardes-793081277cb46143e3ccd80ae1d868febacf3fbd.tar.gz
pardes-793081277cb46143e3ccd80ae1d868febacf3fbd.zip
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 <[email protected]>
-rw-r--r--test/soak.py12
1 files 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)