From: Frantisek Sumsal Date: Wed, 3 May 2023 09:06:01 +0000 (+0200) Subject: test: further extend our collection of corrupted journals X-Git-Tag: v254-rc1~569 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4039ceb9e063d72f6afb7bc05d583de55966718;p=thirdparty%2Fsystemd.git test: further extend our collection of corrupted journals And make adding them slightly easier. Provides coverage for b5335da7a5. --- diff --git a/test/test-journals/corrupted/id:000000,src:000031,time:210669947,execs:34191940,op:havoc,rep:32.zst b/test/test-journals/corrupted/id:000000,src:000031,time:210669947,execs:34191940,op:havoc,rep:32.zst new file mode 100644 index 00000000000..40906808010 Binary files /dev/null and b/test/test-journals/corrupted/id:000000,src:000031,time:210669947,execs:34191940,op:havoc,rep:32.zst differ diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh index 3a7c0347ae4..7ed91896232 100755 --- a/test/units/testsuite-04.sh +++ b/test/units/testsuite-04.sh @@ -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