test: drop whitespace after shell redirection operators
This commit is contained in:
committed by
Luca Boccassi
parent
c0da88f8d9
commit
075036f205
+1
-1
@@ -1,3 +1,3 @@
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=bash -c "echo failure >> /tmp/success-failure-test-result && systemd-notify --ready && sleep infinity"
|
||||
ExecStart=bash -c "echo failure >>/tmp/success-failure-test-result && systemd-notify --ready && sleep infinity"
|
||||
|
||||
+5
-5
@@ -12,7 +12,7 @@ FILE="/tmp/fdstore-data.$PINNED"
|
||||
# a restart, the third a stop followed by a start
|
||||
|
||||
if [ -e "$COUNTER" ] ; then
|
||||
read -r N < "$COUNTER"
|
||||
read -r N <"$COUNTER"
|
||||
else
|
||||
N=0
|
||||
fi
|
||||
@@ -23,13 +23,13 @@ if [ "$N" -eq 0 ] ; then
|
||||
# First iteration
|
||||
test "${LISTEN_FDS:-0}" -eq 0
|
||||
test ! -e "$FILE"
|
||||
echo waldi > "$FILE"
|
||||
systemd-notify --fd=3 --fdname="fd-$N-$PINNED" 3< "$FILE"
|
||||
echo waldi >"$FILE"
|
||||
systemd-notify --fd=3 --fdname="fd-$N-$PINNED" 3<"$FILE"
|
||||
elif [ "$N" -eq 1 ] || { [ "$N" -eq 2 ] && [ "$PINNED" -eq 1 ]; } ; then
|
||||
# Second iteration, or iteration with pinning on
|
||||
test "${LISTEN_FDS:-0}" -eq 1
|
||||
# We reopen fd #3 here, so that the read offset is at zero each time (hence no <&3 here…)
|
||||
read -r word < /proc/self/fd/3
|
||||
read -r word </proc/self/fd/3
|
||||
test "$word" = "waldi"
|
||||
else
|
||||
test "${LISTEN_FDS:-0}" -eq 0
|
||||
@@ -39,7 +39,7 @@ fi
|
||||
if [ "$N" -ge 2 ] ; then
|
||||
rm "$COUNTER" "$FILE"
|
||||
else
|
||||
echo $((N + 1)) > "$COUNTER"
|
||||
echo $((N + 1)) >"$COUNTER"
|
||||
fi
|
||||
|
||||
systemd-notify --ready --status="Ready"
|
||||
|
||||
Reference in New Issue
Block a user