1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

test: use an explicit no-op for file truncation

This commit is contained in:
Frantisek Sumsal 2021-04-09 19:52:46 +02:00
parent f794098356
commit 70ad107bdf
5 changed files with 6 additions and 6 deletions

View File

@ -6,14 +6,14 @@ set -o pipefail
# Skip empty lines
ID=$(journalctl --new-id128 | sed -n 2p)
>/expected
: >/expected
printf $'\n\n\n' | systemd-cat -t "$ID" --level-prefix false
journalctl --sync
journalctl -b -o cat -t "$ID" >/output
cmp /expected /output
ID=$(journalctl --new-id128 | sed -n 2p)
>/expected
: >/expected
printf $'<5>\n<6>\n<7>\n' | systemd-cat -t "$ID" --level-prefix true
journalctl --sync
journalctl -b -o cat -t "$ID" >/output

View File

@ -3,7 +3,7 @@
set -eux
set -o pipefail
>/failed
: >/failed
for t in "${0%.sh}".*.sh; do
echo "Running $t"; ./"$t"

View File

@ -161,7 +161,7 @@ test -f /tmp/F/ro-fs/foo
grep -q 'truncating is not allowed' /tmp/F/ro-fs/foo
# Trying to change the perms should fail.
>/tmp/F/rw-fs/foo
: >/tmp/F/rw-fs/foo
systemd-tmpfiles --create - <<EOF && { echo 'unexpected success'; exit 1; }
F /tmp/F/ro-fs/foo 0666 - - - -
EOF

View File

@ -3,7 +3,7 @@
set -eux
set -o pipefail
>/failed
: >/failed
for t in "${0%.sh}".*.sh; do
echo "Running $t"; ./"$t"

View File

@ -2,7 +2,7 @@
set -eux
set -o pipefail
>/failed
: >/failed
# Reset host date to current time, 3 days in the past.
date -s "-3 days"