]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: use sync instead of flush 2049/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Fri, 27 Nov 2015 13:55:23 +0000 (13:55 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Fri, 27 Nov 2015 13:55:23 +0000 (13:55 +0000)
flush doesn't sync a journal -> tests sometimes fail

test/TEST-04-JOURNAL/test-journal.sh

index 956e3771009cc87533369eb93b1f2683d9569485..1ee39df432d89c22075b0c41d3c73e2d2c64b610 100755 (executable)
@@ -10,14 +10,14 @@ set -o pipefail
 ID=$(journalctl --new-id128 | sed -n 2p)
 >/expected
 printf $'\n\n\n' | systemd-cat -t "$ID" --level-prefix false
-journalctl --flush
+journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output
 
 ID=$(journalctl --new-id128 | sed -n 2p)
 >/expected
 printf $'<5>\n<6>\n<7>\n' | systemd-cat -t "$ID" --level-prefix true
-journalctl --flush
+journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output
 
@@ -25,14 +25,14 @@ cmp /expected /output
 ID=$(journalctl --new-id128 | sed -n 2p)
 printf "Trailing spaces\n">/expected
 printf $'<5>Trailing spaces \t \n' | systemd-cat -t "$ID" --level-prefix true
-journalctl --flush
+journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output
 
 ID=$(journalctl --new-id128 | sed -n 2p)
 printf "Trailing spaces\n">/expected
 printf $'Trailing spaces \t \n' | systemd-cat -t "$ID" --level-prefix false
-journalctl --flush
+journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output
 
@@ -40,14 +40,14 @@ cmp /expected /output
 ID=$(journalctl --new-id128 | sed -n 2p)
 printf $' \t Leading spaces\n'>/expected
 printf $'<5> \t Leading spaces\n' | systemd-cat -t "$ID" --level-prefix true
-journalctl --flush
+journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output
 
 ID=$(journalctl --new-id128 | sed -n 2p)
 printf $' \t Leading spaces\n'>/expected
 printf $' \t Leading spaces\n' | systemd-cat -t "$ID" --level-prefix false
-journalctl --flush
+journalctl --sync
 journalctl -b -o cat -t "$ID" >/output
 cmp /expected /output