1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

test: Add a test case for #15654

This commit is contained in:
Benjamin Robin 2020-05-06 23:28:02 +02:00 committed by Lennart Poettering
parent 45ba1ea5e9
commit c11d8fd1da

View File

@ -87,6 +87,14 @@ journalctl -b -o export -t "$ID" --output-fields=_PID | grep '^_PID=' >/output
grep -q "^_PID=$PID" /output grep -q "^_PID=$PID" /output
grep -vq "^_PID=$PID" /output grep -vq "^_PID=$PID" /output
# https://github.com/systemd/systemd/issues/15654
ID=$(journalctl --new-id128 | sed -n 2p)
printf "This will\nusually fail\nand be truncated\n">/expected
systemd-cat -t "$ID" /bin/sh -c 'env echo -n "This will";echo;env echo -n "usually fail";echo;env echo -n "and be truncated";echo;'
journalctl --sync
journalctl -b -o cat -t "$ID" >/output
cmp /expected /output
# Add new tests before here, the journald restarts below # Add new tests before here, the journald restarts below
# may make tests flappy. # may make tests flappy.