From 7f0403c8c150d360c933a83c83f9aa4d33e48b03 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 16 Mar 2022 17:03:28 +0100 Subject: [PATCH] tool/run: multiple attempt for AMT SOL connection Some devices do not answer connection attempts timely, which leads amtterm to time out (after 60s). Using multiple attempts in 500 ms intervals results in timely connection and complete boot logs. Issue #4429 --- tool/run/log/amt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tool/run/log/amt b/tool/run/log/amt index db50009cd8..f20b015a8d 100644 --- a/tool/run/log/amt +++ b/tool/run/log/amt @@ -86,8 +86,12 @@ proc run_log { wait_for_re timeout_value } { } set exit_result 1 - spawn /bin/sh -c "$amt_cmd" - set output_spawn_id $spawn_id + lassign [retry 30 "/bin/sh -c \"$amt_cmd\"" ".*session authentication" 0.5] retry_output output_spawn_id + + if {$retry_output == ""} { + puts stderr "Aborting, AMT SOL not accessible" + return false + } set kernel_msg [run_boot_string]