test: make shellcheck happy again

No functional changes.
This commit is contained in:
Frantisek Sumsal
2023-05-16 20:55:45 +02:00
parent 16eb568766
commit e71bac7222
10 changed files with 13 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -20,6 +20,7 @@ EOF
systemctl restart systemd-udevd.service
}
# shellcheck disable=SC2317
teardown() {
set +e

View File

@@ -8,6 +8,7 @@ set -o pipefail
# Coverage test for udevadm
# shellcheck disable=SC2317
cleanup_17_10() {
set +e

View File

@@ -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}"

View File

@@ -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

View File

@@ -3,6 +3,7 @@
set -eux
set -o pipefail
# shellcheck disable=SC2317
at_exit() {
# shellcheck disable=SC2181
if [[ $? -ne 0 ]]; then

View File

@@ -7,6 +7,7 @@ set -o pipefail
export SYSTEMD_LOG_LEVEL=debug
# shellcheck disable=SC2317
cleanup() {(
set +ex

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
# shellcheck disable=SC2317
set -eux
set -o pipefail

View File

@@ -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