]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: append .journal to unpacked corrupted journals
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 19 Apr 2026 14:24:55 +0000 (16:24 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 20 Apr 2026 07:37:13 +0000 (09:37 +0200)
Otherwise `journalctl --directory=` skips over them in the second part of
the test.

test/units/TEST-04-JOURNAL.corrupted-journals.sh

index 479011ea78f43b81d0c162f281f30357ea67ba06..3dd0fc6dde56a1b257e56e979194a533bc19f159 100755 (executable)
@@ -9,7 +9,7 @@ REMOTE_OUT="$(mktemp -d)"
 unzstd --stdout "/usr/lib/systemd/tests/testdata/test-journals/afl-corrupted-journals.tar.zst" | tar -xC "$JOURNAL_DIR/"
 while read -r file; do
     filename="${file##*/}"
-    unzstd "$file" -o "$JOURNAL_DIR/${filename%*.zst}"
+    unzstd "$file" -o "$JOURNAL_DIR/${filename%.zst}.journal"
 done < <(find /usr/lib/systemd/tests/testdata/test-journals/corrupted/ -name "*.zst")
 # First, try each of them sequentially. Skip this part when running with plain
 # QEMU, as it is excruciatingly slow