From: Frantisek Sumsal Date: Wed, 3 May 2023 15:32:36 +0000 (+0200) Subject: test: slightly extend checks on corrupted journals X-Git-Tag: v254-rc1~559^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23f83ba768e74f1b73aa30a556c0da4680c5abc8;p=thirdparty%2Fsystemd.git test: slightly extend checks on corrupted journals --- diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh index 7ed91896232..265f7d93069 100755 --- a/test/units/testsuite-04.sh +++ b/test/units/testsuite-04.sh @@ -333,27 +333,33 @@ done < <(find /test-journals/corrupted/ -name "*.zst") # >124 (like signals) if [[ "$(systemd-detect-virt -v)" != "qemu" ]]; then while read -r file; do - timeout 10 journalctl -b --file="$file" >/dev/null || [[ $? -lt 124 ]] - timeout 10 journalctl -o export --file="$file" >/dev/null || [[ $? -lt 124 ]] + timeout 10 journalctl --file="$file" --boot >/dev/null || [[ $? -lt 124 ]] + timeout 10 journalctl --file="$file" --verify >/dev/null || [[ $? -lt 124 ]] + timeout 10 journalctl --file="$file" --output=export >/dev/null || [[ $? -lt 124 ]] + timeout 10 journalctl --file="$file" --fields >/dev/null || [[ $? -lt 124 ]] + timeout 10 journalctl --file="$file" --list-boots >/dev/null || [[ $? -lt 124 ]] if [[ -x /usr/lib/systemd/systemd-journal-remote ]]; then timeout 10 /usr/lib/systemd/systemd-journal-remote \ - --getter="journalctl -o export --file=$file" \ + --getter="journalctl --file=$file --output=export" \ --split-mode=none \ --output="$REMOTE_OUT/system.journal" || [[ $? -lt 124 ]] - timeout 10 journalctl -b --directory="$REMOTE_OUT" >/dev/null || [[ $? -lt 124 ]] + timeout 10 journalctl --directory="$REMOTE_OUT" >/dev/null || [[ $? -lt 124 ]] rm -f "$REMOTE_OUT"/* fi done < <(find "$JOURNAL_DIR" -type f) fi # And now all at once -timeout 30 journalctl -b --directory="$JOURNAL_DIR" >/dev/null || [[ $? -lt 124 ]] -timeout 30 journalctl -o export --directory="$JOURNAL_DIR" >/dev/null || [[ $? -lt 124 ]] +timeout 30 journalctl --directory="$JOURNAL_DIR" --boot >/dev/null || [[ $? -lt 124 ]] +timeout 30 journalctl --directory="$JOURNAL_DIR" --verify >/dev/null || [[ $? -lt 124 ]] +timeout 30 journalctl --directory="$JOURNAL_DIR" --output=export >/dev/null || [[ $? -lt 124 ]] +timeout 30 journalctl --directory="$JOURNAL_DIR" --fields >/dev/null || [[ $? -lt 124 ]] +timeout 30 journalctl --directory="$JOURNAL_DIR" --list-boots >/dev/null || [[ $? -lt 124 ]] if [[ -x /usr/lib/systemd/systemd-journal-remote ]]; then timeout 30 /usr/lib/systemd/systemd-journal-remote \ - --getter="journalctl -o export --directory=$JOURNAL_DIR" \ + --getter="journalctl --directory=$JOURNAL_DIR --output=export" \ --split-mode=none \ --output="$REMOTE_OUT/system.journal" || [[ $? -lt 124 ]] - timeout 10 journalctl -b --directory="$REMOTE_OUT" >/dev/null || [[ $? -lt 124 ]] + timeout 30 journalctl --directory="$REMOTE_OUT" >/dev/null || [[ $? -lt 124 ]] rm -f "$REMOTE_OUT"/* fi