summaryrefslogtreecommitdiff
path: root/test/TEST-27-STDOUTFILE
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-27 17:30:23 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-11-28 13:05:54 +0900
commit324ca05459422b55cb6fa04318552541159c239a (patch)
tree8cdc7db59c8d1a2e40ffdfe36a2d6d33308dcbce /test/TEST-27-STDOUTFILE
parent466a2bee94ccd2518c8b22299509adefb29cd15d (diff)
downloadsystemd-324ca05459422b55cb6fa04318552541159c239a.tar.gz
test: make TEST-27 non-racy
Not sure how I missed this, but we of course need to wait for the "systemd-run" commands to finish before we can check the output files this generated.
Diffstat (limited to 'test/TEST-27-STDOUTFILE')
-rwxr-xr-xtest/TEST-27-STDOUTFILE/testsuite.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/TEST-27-STDOUTFILE/testsuite.sh b/test/TEST-27-STDOUTFILE/testsuite.sh
index 75559e03e5..b8fcc46e33 100755
--- a/test/TEST-27-STDOUTFILE/testsuite.sh
+++ b/test/TEST-27-STDOUTFILE/testsuite.sh
@@ -7,7 +7,7 @@ set -o pipefail
systemd-analyze set-log-level debug
systemd-analyze set-log-target console
-systemd-run --unit=one -p StandardOutput=file:/tmp/stdout -p StandardError=file:/tmp/stderr -p Type=exec sh -c 'echo x ; echo y >&2'
+systemd-run --wait --unit=one -p StandardOutput=file:/tmp/stdout -p StandardError=file:/tmp/stderr -p Type=exec sh -c 'echo x ; echo y >&2'
cmp /tmp/stdout <<EOF
x
EOF
@@ -15,7 +15,7 @@ cmp /tmp/stderr <<EOF
y
EOF
-systemd-run --unit=two -p StandardOutput=file:/tmp/stdout -p StandardError=file:/tmp/stderr -p Type=exec sh -c 'echo z ; echo a >&2'
+systemd-run --wait --unit=two -p StandardOutput=file:/tmp/stdout -p StandardError=file:/tmp/stderr -p Type=exec sh -c 'echo z ; echo a >&2'
cmp /tmp/stdout <<EOF
z
EOF
@@ -23,7 +23,7 @@ cmp /tmp/stderr <<EOF
a
EOF
-systemd-run --unit=three -p StandardOutput=append:/tmp/stdout -p StandardError=append:/tmp/stderr -p Type=exec sh -c 'echo b ; echo c >&2'
+systemd-run --wait --unit=three -p StandardOutput=append:/tmp/stdout -p StandardError=append:/tmp/stderr -p Type=exec sh -c 'echo b ; echo c >&2'
cmp /tmp/stdout <<EOF
z
b