test: further extend our collection of corrupted journals

And make adding them slightly easier.

Provides coverage for b5335da7a5.
This commit is contained in:
Frantisek Sumsal 2023-05-03 11:06:01 +02:00
parent a76dc1f3a0
commit c4039ceb9e
2 changed files with 4 additions and 0 deletions

View file

@ -323,6 +323,10 @@ 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/"
while read -r file; do
filename="${file##*/}"
unzstd "$file" -o "$JOURNAL_DIR/${filename%*.zst}"
done < <(find /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