summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/cuda-ab/soak.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/cuda-ab/soak.sh b/tools/cuda-ab/soak.sh
index f870fda..c150692 100755
--- a/tools/cuda-ab/soak.sh
+++ b/tools/cuda-ab/soak.sh
@@ -135,6 +135,19 @@ run_one() {
r="$(gssh "cat $out 2>/dev/null")" || true
[ -n "$r" ] && text="$r"
printf '%s' "$text" | grep -q 'EXIT=' && break
+ # The guest wrapper's EXIT= marker can be lost when the guest's
+ # process reaping stalls (observed: the client reached STATUS OK
+ # but its zombie was never reaped and `timeout` never wrote the
+ # marker). A terminal STATUS line is proof of completion by
+ # itself - accept it after a short grace so the EXIT= marker
+ # still wins when it does arrive.
+ if printf '%s' "$text" | grep -qE 'STATUS (OK|FAIL)'; then
+ sleep 10
+ r="$(gssh "cat $out 2>/dev/null")" || true
+ [ -n "$r" ] && text="$r"
+ printf '%s' "$text" | grep -q 'EXIT=' && break
+ break
+ fi
tnow=$(date +%s)
if [ $((tnow - t0)) -gt $((TMO + 120)) ]; then
if client_alive "$bin"; then