]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Tests: Add two RISC-V Filter test files.
authorJia Tan <jiat0218@gmail.com>
Mon, 22 Jan 2024 15:33:39 +0000 (23:33 +0800)
committerJia Tan <jiat0218@gmail.com>
Tue, 23 Jan 2024 15:05:47 +0000 (23:05 +0800)
These test files achieve 100% code coverage in
src/liblzma/simple/riscv.c. They contain all of the instructions that
should be filtered and a few cases that should not.

tests/files/README
tests/files/good-1-riscv-lzma2-1.xz [new file with mode: 0644]
tests/files/good-1-riscv-lzma2-2.xz [new file with mode: 0644]

index 119cac48a4cc4e9daed597c1ef9b24d94a5b5540..b0b700c514989384fda8cc64db2643e7516e68eb 100644 (file)
     good-1-arm64-lzma2-2.xz is like good-1-arm64-lzma2-1.xz but with
     non-zero start offset. XZ Embedded doesn't support this file.
 
+    good-1-riscv-lzma2-1.xz uses the RISC-V filter and LZMA2. The
+    uncompressed data is constructed so it tests all of the instructions
+    that should be encoded and a few that should not. Additionally, the
+    file contains random bytes to help test unforeseen corner cases.
+
+    good-1-riscv-lzma2-2.xz is like good-1-riscv-lzma2-1.xz but with
+    non-zero start offset. XZ Embedded doesn't support this file.
+
     good-1-lzma2-1.xz has two LZMA2 chunks, of which the second sets
     new properties.
 
diff --git a/tests/files/good-1-riscv-lzma2-1.xz b/tests/files/good-1-riscv-lzma2-1.xz
new file mode 100644 (file)
index 0000000..38a0e2f
Binary files /dev/null and b/tests/files/good-1-riscv-lzma2-1.xz differ
diff --git a/tests/files/good-1-riscv-lzma2-2.xz b/tests/files/good-1-riscv-lzma2-2.xz
new file mode 100644 (file)
index 0000000..d7ee659
Binary files /dev/null and b/tests/files/good-1-riscv-lzma2-2.xz differ