|
|
8d419f |
From de9aa9da870f1f5fd1457dd70fd13c221e8b39b3 Mon Sep 17 00:00:00 2001
|
|
|
8d419f |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
8d419f |
Date: Fri, 17 Jun 2022 15:28:17 +0200
|
|
|
8d419f |
Subject: [PATCH] test: fix a couple of issues found by shellcheck
|
|
|
8d419f |
|
|
|
8d419f |
(cherry picked from commit 72f0e89c0da3584d5d0a0124d791b02f0f04e769)
|
|
|
8d419f |
|
|
|
8d419f |
Related: #2087652
|
|
|
8d419f |
---
|
|
|
8d419f |
test/units/testsuite-02.sh | 4 ++--
|
|
|
8d419f |
test/units/testsuite-38.sh | 8 ++++----
|
|
|
8d419f |
2 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
8d419f |
|
|
|
8d419f |
diff --git a/test/units/testsuite-02.sh b/test/units/testsuite-02.sh
|
|
|
8d419f |
index 54927a6377..8ebcc575ee 100755
|
|
|
8d419f |
--- a/test/units/testsuite-02.sh
|
|
|
8d419f |
+++ b/test/units/testsuite-02.sh
|
|
|
8d419f |
@@ -61,7 +61,7 @@ for task in "${TEST_LIST[@]}"; do
|
|
|
8d419f |
# Task has finished, report its result and drop it from the queue
|
|
|
8d419f |
wait "${running[$key]}" && ec=0 || ec=$?
|
|
|
8d419f |
report_result "$key" $ec
|
|
|
8d419f |
- unset running["$key"]
|
|
|
8d419f |
+ unset "running[$key]"
|
|
|
8d419f |
# Break from inner for loop and outer while loop to skip
|
|
|
8d419f |
# the sleep below when we find a free slot in the queue
|
|
|
8d419f |
break 2
|
|
|
8d419f |
@@ -85,7 +85,7 @@ for key in "${!running[@]}"; do
|
|
|
8d419f |
echo "Waiting for test '$key' to finish"
|
|
|
8d419f |
wait ${running[$key]} && ec=0 || ec=$?
|
|
|
8d419f |
report_result "$key" $ec
|
|
|
8d419f |
- unset running["$key"]
|
|
|
8d419f |
+ unset "running[$key]"
|
|
|
8d419f |
done
|
|
|
8d419f |
|
|
|
8d419f |
set -x
|
|
|
8d419f |
diff --git a/test/units/testsuite-38.sh b/test/units/testsuite-38.sh
|
|
|
8d419f |
index 438990d1c5..c5f9bcc22c 100755
|
|
|
8d419f |
--- a/test/units/testsuite-38.sh
|
|
|
8d419f |
+++ b/test/units/testsuite-38.sh
|
|
|
8d419f |
@@ -17,7 +17,7 @@ dbus_freeze() {
|
|
|
8d419f |
local name object_path suffix
|
|
|
8d419f |
|
|
|
8d419f |
suffix="${1##*.}"
|
|
|
8d419f |
- name="${1%.$suffix}"
|
|
|
8d419f |
+ name="${1%".$suffix"}"
|
|
|
8d419f |
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
|
|
|
8d419f |
|
|
|
8d419f |
busctl call \
|
|
|
8d419f |
@@ -31,7 +31,7 @@ dbus_thaw() {
|
|
|
8d419f |
local name object_path suffix
|
|
|
8d419f |
|
|
|
8d419f |
suffix="${1##*.}"
|
|
|
8d419f |
- name="${1%.$suffix}"
|
|
|
8d419f |
+ name="${1%".$suffix"}"
|
|
|
8d419f |
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
|
|
|
8d419f |
|
|
|
8d419f |
busctl call \
|
|
|
8d419f |
@@ -65,7 +65,7 @@ dbus_can_freeze() {
|
|
|
8d419f |
local name object_path suffix
|
|
|
8d419f |
|
|
|
8d419f |
suffix="${1##*.}"
|
|
|
8d419f |
- name="${1%.$suffix}"
|
|
|
8d419f |
+ name="${1%".$suffix"}"
|
|
|
8d419f |
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
|
|
|
8d419f |
|
|
|
8d419f |
busctl get-property \
|
|
|
8d419f |
@@ -79,7 +79,7 @@ check_freezer_state() {
|
|
|
8d419f |
local name object_path suffix
|
|
|
8d419f |
|
|
|
8d419f |
suffix="${1##*.}"
|
|
|
8d419f |
- name="${1%.$suffix}"
|
|
|
8d419f |
+ name="${1%".$suffix"}"
|
|
|
8d419f |
object_path="/org/freedesktop/systemd1/unit/${name//-/_2d}_2e${suffix}"
|
|
|
8d419f |
|
|
|
8d419f |
for _ in {0..10}; do
|