aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2024-01-22 23:33:39 +0800
committerJia Tan <jiat0218@gmail.com>2024-01-23 23:05:47 +0800
commite2870db5be1503e6a489fc3d47daf950d6f62723 (patch)
tree9a1b5eb9bde7f2fa5fc2f2ef4c32fb37773d65ec
parentxz: Update message in --long-help for RISC-V Filter. (diff)
downloadxz-e2870db5be1503e6a489fc3d47daf950d6f62723.tar.xz
Tests: Add two RISC-V Filter test files.
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.
-rw-r--r--tests/files/README8
-rw-r--r--tests/files/good-1-riscv-lzma2-1.xzbin0 -> 7512 bytes
-rw-r--r--tests/files/good-1-riscv-lzma2-2.xzbin0 -> 7516 bytes
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/files/README b/tests/files/README
index 119cac48..b0b700c5 100644
--- a/tests/files/README
+++ b/tests/files/README
@@ -80,6 +80,14 @@
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
index 00000000..38a0e2fd
--- /dev/null
+++ b/tests/files/good-1-riscv-lzma2-1.xz
Binary files 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
index 00000000..d7ee659b
--- /dev/null
+++ b/tests/files/good-1-riscv-lzma2-2.xz
Binary files differ