]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Suppress spurious failures from old liblzma 3001/head
authorTim Kientzle <kientzle@acm.org>
Tue, 5 May 2026 00:14:21 +0000 (17:14 -0700)
committerTim Kientzle <kientzle@acm.org>
Tue, 5 May 2026 00:14:21 +0000 (17:14 -0700)
libarchive/test/test_read_format_7zip.c

index a34531440b051e5729e04f5bcec3f9ec0cb38c65..1a22f52af74c78dd59344d14eb8e3e285b9dae6c 100644 (file)
@@ -1476,8 +1476,8 @@ test_riscv_filter(const char *refname)
        assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
        assertEqualInt((AE_IFREG | 0775), archive_entry_mode(ae));
        assertEqualString("hw-riscv64", archive_entry_pathname(ae));
-       assertEqualInt(sizeof(buff), archive_entry_size(ae));
-       assertEqualInt(sizeof(buff), archive_read_data(a, buff, sizeof(buff)));
+       assertEqualIntA(a, sizeof(buff), archive_entry_size(ae));
+       assertEqualIntA(a, sizeof(buff), archive_read_data(a, buff, sizeof(buff)));
 
        computed_crc = bitcrc32(computed_crc, buff, sizeof(buff));
        assertEqualInt(computed_crc, expected_crc);
@@ -1500,6 +1500,8 @@ DEFINE_TEST(test_read_format_7zip_lzma2_riscv)
 
        if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) {
                skipping("7zip:lzma decoding is not supported on this platform");
+       } else if (!lzma_filter_decoder_is_supported(LZMA_FILTER_RISCV)) {
+               skipping("liblzma does not support RISC-V BCJ filter at runtime");
        } else {
                test_riscv_filter("test_read_format_7zip_lzma2_riscv.7z");
        }