diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/soak.py | 12 |
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) |
