richardphibel / rpms / systemd

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