summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag
diff options
context:
space:
mode:
Diffstat (limited to 'tools/guest-diag')
-rwxr-xr-xtools/guest-diag/run_cycle.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/guest-diag/run_cycle.sh b/tools/guest-diag/run_cycle.sh
index 6786aa1..71db054 100755
--- a/tools/guest-diag/run_cycle.sh
+++ b/tools/guest-diag/run_cycle.sh
@@ -78,6 +78,13 @@ elif [ "$TRACE" = "gdb" ]; then
ARMED=1
break
fi
+ # The launch exec can time out even though nohup gdb started; verify
+ # from the guest side before declaring the arm failed.
+ if timeout 20 "$VMEXEC" exec "pgrep -f 'gdb -p' >/dev/null && echo GDBOK" 2>/dev/null | grep -q GDBOK; then
+ echo " arm attempt $a: exec timed out but gdb is running; continuing"
+ ARMED=1
+ break
+ fi
echo " arm attempt $a failed; retrying"
sleep 8
done