diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2023-02-27 07:34:36 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2023-02-27 07:37:04 +0000 |
commit | b981a3550bc047f0a858fd302fc71e04d9f47d90 (patch) | |
tree | 608ca8e5f180b1fd6c83bde57f176a2ce6af942e /tcwg-benchmark.sh | |
parent | 5bc3ecf87a5c79b364a6ddf66b879e38b4429bf8 (diff) |
tcwg-benchmark.sh: Fix reboot sequence
Change-Id: Ie2928b47dcc418b715538c5f01e28a7220d5df10
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-x | tcwg-benchmark.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh index 8664bee2..feb6671a 100755 --- a/tcwg-benchmark.sh +++ b/tcwg-benchmark.sh @@ -308,14 +308,23 @@ force_power_cycle=false while [ $tries_left != 0 ]; do tries_left=$(($tries_left-1)) + if timeout 1m ssh "$boardname" true; then + ssh_cmd="ssh" + elif timeout 1m ssh -p22 -lroot "$boardname" true; then + ssh_cmd="ssh -p22 -lroot" + else + ssh_cmd="ssh -p22 -lroot" + force_power_cycle=true + fi + if ! $reboot && $prepare_board; then # Check board for kernel panics and reboot, if any. dmesg_file="$boardname.dmesg-$(date +%s)" - timeout 1m ssh "$boardname" dmesg -l emerg 2>&1 \ + timeout 1m $ssh_cmd "$boardname" dmesg -l emerg 2>&1 \ | tee "$dmesg_file-emerg" if [ x"$(cat "$dmesg_file-emerg" | wc -l)" != x"0" ]; then reboot=true - timeout 1m ssh -p22 -lroot "$boardname" dmesg 2>&1 \ + timeout 1m $ssh_cmd "$boardname" dmesg 2>&1 \ | tee "$dmesg_file" else # Remove empty dmesg reports, but keep non-empty ones for offline @@ -326,14 +335,6 @@ while [ $tries_left != 0 ]; do fi if $reboot; then - if timeout 1m ssh "$boardname" true; then - ssh_cmd="ssh" - elif timeout 1m ssh -p22 -lroot "$boardname" true; then - ssh_cmd="ssh -p22 -lroot" - else - force_power_cycle=true - fi - if $force_power_cycle; then echo "Trying to power-cycle $boardname" ( |