mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
test: insert space in for loop
This commit is contained in:
parent
47ba157cc0
commit
2f34ee3329
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user