summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-05-16 20:55:45 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-05-16 23:07:45 +0200
commite71bac7222b344c88fb62a9dda9dae3864b6da90 (patch)
tree4037a48cbe9db99f3eae7e6fcc2071e0c723c63c
parenttest: merge TEST-48-START-STOP-NO-RELOAD into TEST-23-UNIT-FILE (diff)
downloadsystemd-e71bac7222b344c88fb62a9dda9dae3864b6da90.tar.xz
systemd-e71bac7222b344c88fb62a9dda9dae3864b6da90.zip
test: make shellcheck happy again
No functional changes.
-rwxr-xr-xtest/units/testsuite-02.sh6
-rwxr-xr-xtest/units/testsuite-17.02.sh1
-rwxr-xr-xtest/units/testsuite-17.03.sh1
-rwxr-xr-xtest/units/testsuite-17.10.sh1
-rwxr-xr-xtest/units/testsuite-17.11.sh1
-rwxr-xr-xtest/units/testsuite-35.sh2
-rwxr-xr-xtest/units/testsuite-36.sh1
-rwxr-xr-xtest/units/testsuite-50.sh1
-rwxr-xr-xtest/units/testsuite-61.sh1
-rwxr-xr-xtest/units/testsuite-62.sh4
10 files changed, 13 insertions, 6 deletions
diff --git a/test/units/testsuite-02.sh b/test/units/testsuite-02.sh
index 211bd10547..d8aaacb913 100755
--- a/test/units/testsuite-02.sh
+++ b/test/units/testsuite-02.sh
@@ -60,7 +60,7 @@ for task in "${TEST_LIST[@]}"; do
if ! kill -0 "${running[$key]}" &>/dev/null; then
# Task has finished, report its result and drop it from the queue
wait "${running[$key]}" && ec=0 || ec=$?
- report_result "$key" $ec
+ report_result "$key" "$ec"
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
@@ -83,8 +83,8 @@ done
# Wait for remaining running tasks
for key in "${!running[@]}"; do
echo "Waiting for test '$key' to finish"
- wait ${running[$key]} && ec=0 || ec=$?
- report_result "$key" $ec
+ wait "${running[$key]}" && ec=0 || ec=$?
+ report_result "$key" "$ec"
unset "running[$key]"
done
diff --git a/test/units/testsuite-17.02.sh b/test/units/testsuite-17.02.sh
index 22b1552653..f5b5f372d1 100755
--- a/test/units/testsuite-17.02.sh
+++ b/test/units/testsuite-17.02.sh
@@ -100,6 +100,7 @@ timeout 30 bash -c 'while [[ "$(systemctl show --property=ActiveState --value /s
# cleanup
ip link del hoge
+# shellcheck disable=SC2317
teardown_netif_renaming_conflict() {
set +ex
diff --git a/test/units/testsuite-17.03.sh b/test/units/testsuite-17.03.sh
index 318afdcb5a..fafe9d186c 100755
--- a/test/units/testsuite-17.03.sh
+++ b/test/units/testsuite-17.03.sh
@@ -20,6 +20,7 @@ EOF
systemctl restart systemd-udevd.service
}
+# shellcheck disable=SC2317
teardown() {
set +e
diff --git a/test/units/testsuite-17.10.sh b/test/units/testsuite-17.10.sh
index a58112682e..4d8b94f248 100755
--- a/test/units/testsuite-17.10.sh
+++ b/test/units/testsuite-17.10.sh
@@ -8,6 +8,7 @@ set -o pipefail
# Coverage test for udevadm
+# shellcheck disable=SC2317
cleanup_17_10() {
set +e
diff --git a/test/units/testsuite-17.11.sh b/test/units/testsuite-17.11.sh
index f2b5ab96ff..f1897b6785 100755
--- a/test/units/testsuite-17.11.sh
+++ b/test/units/testsuite-17.11.sh
@@ -8,6 +8,7 @@ set -o pipefail
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
+# shellcheck disable=SC2317
cleanup() {
cd /
rm -rf "${workdir}"
diff --git a/test/units/testsuite-35.sh b/test/units/testsuite-35.sh
index 2c6a384299..8cb380d2fd 100755
--- a/test/units/testsuite-35.sh
+++ b/test/units/testsuite-35.sh
@@ -468,7 +468,7 @@ test_lock_idle_action() {
fi
if loginctl --no-legend | grep -q logind-test-user; then
- echo >&2 "Session of the \'logind-test-user\' is already present."
+ echo >&2 "Session of the 'logind-test-user' is already present."
exit 1
fi
diff --git a/test/units/testsuite-36.sh b/test/units/testsuite-36.sh
index 9705f2db86..d242749b61 100755
--- a/test/units/testsuite-36.sh
+++ b/test/units/testsuite-36.sh
@@ -3,6 +3,7 @@
set -eux
set -o pipefail
+# shellcheck disable=SC2317
at_exit() {
# shellcheck disable=SC2181
if [[ $? -ne 0 ]]; then
diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh
index 1b703dc18c..cdb7c0043b 100755
--- a/test/units/testsuite-50.sh
+++ b/test/units/testsuite-50.sh
@@ -7,6 +7,7 @@ set -o pipefail
export SYSTEMD_LOG_LEVEL=debug
+# shellcheck disable=SC2317
cleanup() {(
set +ex
diff --git a/test/units/testsuite-61.sh b/test/units/testsuite-61.sh
index 748e24a7ca..0b7b0116d3 100755
--- a/test/units/testsuite-61.sh
+++ b/test/units/testsuite-61.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
+# shellcheck disable=SC2317
set -eux
set -o pipefail
diff --git a/test/units/testsuite-62.sh b/test/units/testsuite-62.sh
index 1b3b11adf1..8ba01f54d7 100755
--- a/test/units/testsuite-62.sh
+++ b/test/units/testsuite-62.sh
@@ -21,11 +21,11 @@ setup() {
done
}
+# shellcheck disable=SC2317
teardown() {
set +e
- for i in {0..3};
- do
+ for i in {0..3}; do
ip netns del "ns${i}"
ip link del "veth${i}"
done