You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.5 KiB
139 lines
4.5 KiB
From a480327b20deb75d5595878f2924490ef3aa4064 Mon Sep 17 00:00:00 2001 |
|
From: Yu Watanabe <watanabe.yu+github@gmail.com> |
|
Date: Tue, 14 Jun 2022 21:05:10 +0900 |
|
Subject: [PATCH] test: insert space in for loop |
|
|
|
(cherry picked from commit 2f34ee33291c92fd46308213689540cb76fb8e2b) |
|
|
|
Related: #2087652 |
|
--- |
|
test/units/testsuite-17.06.sh | 6 +++--- |
|
test/units/testsuite-35.sh | 8 ++++---- |
|
test/units/testsuite-45.sh | 6 +++--- |
|
test/units/testsuite-46.sh | 2 +- |
|
test/units/testsuite-60.sh | 2 +- |
|
5 files changed, 12 insertions(+), 12 deletions(-) |
|
|
|
diff --git a/test/units/testsuite-17.06.sh b/test/units/testsuite-17.06.sh |
|
index f2a0442dc3..224063f6a6 100755 |
|
--- a/test/units/testsuite-17.06.sh |
|
+++ b/test/units/testsuite-17.06.sh |
|
@@ -18,18 +18,18 @@ function check_validity() { |
|
function check() { |
|
local i j |
|
|
|
- for ((i=0;i<2;i++)); do |
|
+ for ((i = 0; i < 2; i++)); do |
|
systemctl restart systemd-udevd.service |
|
udevadm control --ping |
|
udevadm settle |
|
check_validity |
|
|
|
- for ((j=0;j<2;j++)); do |
|
+ for ((j = 0; j < 2; j++)); do |
|
udevadm trigger -w --action add --subsystem-match=block |
|
check_validity |
|
done |
|
|
|
- for ((j=0;j<2;j++)); do |
|
+ for ((j = 0; j < 2; j++)); do |
|
udevadm trigger -w --action change --subsystem-match=block |
|
check_validity |
|
done |
|
diff --git a/test/units/testsuite-35.sh b/test/units/testsuite-35.sh |
|
index 0a7198c3fe..e369cf8701 100755 |
|
--- a/test/units/testsuite-35.sh |
|
+++ b/test/units/testsuite-35.sh |
|
@@ -149,7 +149,7 @@ EOF |
|
evemu-device /run/lidswitch.evemu & |
|
KILL_PID="$!" |
|
|
|
- for ((i=0;i<20;i++)); do |
|
+ for ((i = 0; i < 20; i++)); do |
|
if (( i != 0 )); then sleep .5; fi |
|
|
|
INPUT_NAME=$(grep -l '^Fake Lid Switch' /sys/class/input/*/device/name || :) |
|
@@ -287,7 +287,7 @@ EOF |
|
|
|
# check session |
|
ret=1 |
|
- for ((i=0;i<30;i++)); do |
|
+ for ((i = 0; i < 30; i++)); do |
|
if (( i != 0)); then sleep 1; fi |
|
if check_session; then |
|
ret=0 |
|
@@ -315,7 +315,7 @@ EOF |
|
# coldplug: logind started with existing device |
|
systemctl stop systemd-logind.service |
|
modprobe scsi_debug |
|
- for ((i=0;i<30;i++)); do |
|
+ for ((i = 0; i < 30; i++)); do |
|
if (( i != 0)); then sleep 1; fi |
|
if dev=/dev/$(ls /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block 2>/dev/null); then |
|
break |
|
@@ -342,7 +342,7 @@ EOF |
|
# hotplug: new device appears while logind is running |
|
rmmod scsi_debug |
|
modprobe scsi_debug |
|
- for ((i=0;i<30;i++)); do |
|
+ for ((i = 0; i < 30; i++)); do |
|
if (( i != 0)); then sleep 1; fi |
|
if dev=/dev/$(ls /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block 2>/dev/null); then |
|
break |
|
diff --git a/test/units/testsuite-45.sh b/test/units/testsuite-45.sh |
|
index d0f9dd9461..fd8a99076b 100755 |
|
--- a/test/units/testsuite-45.sh |
|
+++ b/test/units/testsuite-45.sh |
|
@@ -197,7 +197,7 @@ start_mon() { |
|
} |
|
|
|
wait_mon() { |
|
- for ((i=0;i<10;i++)); do |
|
+ for ((i = 0; i < 10; i++)); do |
|
if (( i != 0 )); then sleep 1; fi |
|
if grep -q "$1" "$mon"; then break; fi |
|
done |
|
@@ -228,7 +228,7 @@ EOF |
|
|
|
echo 'disable NTP' |
|
timedatectl set-ntp false |
|
- for ((i=0;i<10;i++)); do |
|
+ for ((i = 0; i < 10; i++)); do |
|
if (( i != 0 )); then sleep 1; fi |
|
if [[ "$(systemctl show systemd-timesyncd --property ActiveState)" == "ActiveState=inactive" ]]; then |
|
break; |
|
@@ -243,7 +243,7 @@ EOF |
|
timedatectl set-ntp true |
|
wait_mon "NTP" "BOOLEAN true" |
|
assert_ntp "true" |
|
- for ((i=0;i<10;i++)); do |
|
+ for ((i = 0; i < 10; i++)); do |
|
if (( i != 0 )); then sleep 1; fi |
|
if [[ "$(systemctl show systemd-timesyncd --property ActiveState)" == "ActiveState=active" ]]; then |
|
break; |
|
diff --git a/test/units/testsuite-46.sh b/test/units/testsuite-46.sh |
|
index 61ee921151..3724a3b5f6 100755 |
|
--- a/test/units/testsuite-46.sh |
|
+++ b/test/units/testsuite-46.sh |
|
@@ -27,7 +27,7 @@ inspect() { |
|
} |
|
|
|
wait_for_state() { |
|
- for ((i=0;i<10;i++)) ; do |
|
+ for ((i = 0; i < 10; i++)) ; do |
|
homectl inspect "$1" | grep -qF "State: $2" && break |
|
sleep .5 |
|
done |
|
diff --git a/test/units/testsuite-60.sh b/test/units/testsuite-60.sh |
|
index 8cb3f466b6..3a097816ca 100755 |
|
--- a/test/units/testsuite-60.sh |
|
+++ b/test/units/testsuite-60.sh |
|
@@ -32,7 +32,7 @@ EOF |
|
# Trigger the mount ratelimiting |
|
cd "$(mktemp -d)" |
|
mkdir foo |
|
- for ((i=0;i<50;++i)); do |
|
+ for ((i = 0; i < 50; i++)); do |
|
mount --bind foo foo |
|
umount foo |
|
done
|
|
|