ryantimwilson / rpms / systemd

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