test: fix a couple of issues found by shellcheck

This commit is contained in:
Frantisek Sumsal 2022-06-17 15:28:17 +02:00
parent c84d1c9822
commit 72f0e89c0d
2 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ for task in "${TEST_LIST[@]}"; do
# Task has finished, report its result and drop it from the queue
wait "${running[$key]}" && ec=0 || ec=$?
report_result "$key" $ec
unset running["$key"]
unset "running[$key]"
# Break from inner for loop and outer while loop to skip
# the sleep below when we find a free slot in the queue
break 2
@ -85,7 +85,7 @@ for key in "${!running[@]}"; do
echo "Waiting for test '$key' to finish"
wait ${running[$key]} && ec=0 || ec=$?
report_result "$key" $ec
unset running["$key"]
unset "running[$key]"
done
set -x

View file

@ -17,7 +17,7 @@ dbus_freeze() {
local name object_path suffix
suffix="${1##*.}"
name="${1%.$suffix}"
name="${1%".$suffix"}"
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
busctl call \
@ -31,7 +31,7 @@ dbus_thaw() {
local name object_path suffix
suffix="${1##*.}"
name="${1%.$suffix}"
name="${1%".$suffix"}"
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
busctl call \
@ -65,7 +65,7 @@ dbus_can_freeze() {
local name object_path suffix
suffix="${1##*.}"
name="${1%.$suffix}"
name="${1%".$suffix"}"
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
busctl get-property \
@ -79,7 +79,7 @@ check_freezer_state() {
local name object_path suffix
suffix="${1##*.}"
name="${1%.$suffix}"
name="${1%".$suffix"}"
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
for _ in {0..10}; do