]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Adjust tests
authorTim Kientzle <kientzle@acm.org>
Thu, 7 May 2026 05:15:11 +0000 (22:15 -0700)
committerTim Kientzle <kientzle@acm.org>
Thu, 7 May 2026 05:15:11 +0000 (22:15 -0700)
libarchive/test/test_read_format_7zip_encryption_partially.c
libarchive/test/test_read_format_rar5_bad_tables.c

index 07a5e234901ce255795805edad458716cb5a3c8c..0d3f9149b924478c0e1b77aacaf03de3cf44a65f 100644 (file)
@@ -68,7 +68,7 @@ DEFINE_TEST(test_read_format_7zip_encryption_partially)
                assertEqualInt(2, archive_file_count(a));
 
                /* End of archive. */
-               assertEqualIntA(a, ARCHIVE_FATAL, archive_read_next_header(a, &ae));
+               assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
        }
 
        /* Verify archive format. */
index 346a9ffdcf138089de555133e64a9a4dfc6848c9..cb64face637640732cc6a86b2a648123609b86e7 100644 (file)
@@ -50,12 +50,8 @@ DEFINE_TEST(test_read_format_rar5_bad_tables)
        /* The file header is valid; the bad data is in the compressed block. */
        assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
 
-       /* Reading must fail because the meta-table is over-subscribed.
-        * TODO: Investigate whether ARCHIVE_FAILED is achievable here
-        * instead of ARCHIVE_FATAL, which would allow the caller to skip
-        * to a subsequent valid entry.  That would also require expanding
-        * the reference archive to include a valid entry after the bad one. */
-       assertEqualIntA(a, ARCHIVE_FATAL,
+       /* Reading must fail because the meta-table is over-subscribed. */
+       assertEqualIntA(a, ARCHIVE_FAILED,
            archive_read_data_block(a, &buf, &size, &offset));
 
        assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));