test: Install test journals
Let's package these just like we package other test data.
This commit is contained in:
@@ -6,11 +6,11 @@ set -o pipefail
|
||||
JOURNAL_DIR="$(mktemp -d)"
|
||||
REMOTE_OUT="$(mktemp -d)"
|
||||
# tar on C8S doesn't support the --zstd option
|
||||
unzstd --stdout "/test-journals/afl-corrupted-journals.tar.zst" | tar -xC "$JOURNAL_DIR/"
|
||||
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}"
|
||||
done < <(find /test-journals/corrupted/ -name "*.zst")
|
||||
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
|
||||
# Note: we care only about exit code 124 (timeout) and special bash exit codes
|
||||
|
||||
@@ -244,7 +244,7 @@ JOURNAL_DIR="$(mktemp -d)"
|
||||
while read -r file; do
|
||||
filename="${file##*/}"
|
||||
unzstd "$file" -o "$JOURNAL_DIR/${filename%*.zst}"
|
||||
done < <(find /test-journals/no-rtc -name "*.zst")
|
||||
done < <(find /usr/lib/systemd/tests/testdata/test-journals/no-rtc -name "*.zst")
|
||||
|
||||
journalctl --directory="$JOURNAL_DIR" --list-boots --output=json >/tmp/lb1
|
||||
diff -u /tmp/lb1 - <<'EOF'
|
||||
|
||||
Reference in New Issue
Block a user