From: Benjamin Robin Date: Wed, 6 May 2020 21:28:02 +0000 (+0200) Subject: test: Add a test case for #15654 X-Git-Tag: v246-rc1~375^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c11d8fd1dab3bc3f0abbc861ba5eb34518cec1da;p=thirdparty%2Fsystemd.git test: Add a test case for #15654 --- diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh index 6e7627313cf..df216a06a3f 100755 --- a/test/units/testsuite-04.sh +++ b/test/units/testsuite-04.sh @@ -87,6 +87,14 @@ journalctl -b -o export -t "$ID" --output-fields=_PID | grep '^_PID=' >/output grep -q "^_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 # may make tests flappy.