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:
parent
f794098356
commit
70ad107bdf
@ -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
|
||||
|
@ -3,7 +3,7 @@
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
>/failed
|
||||
: >/failed
|
||||
|
||||
for t in "${0%.sh}".*.sh; do
|
||||
echo "Running $t"; ./"$t"
|
||||
|
@ -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
|
||||
|
@ -3,7 +3,7 @@
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
>/failed
|
||||
: >/failed
|
||||
|
||||
for t in "${0%.sh}".*.sh; do
|
||||
echo "Running $t"; ./"$t"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user