From: Tim Kientzle Date: Thu, 7 May 2026 05:15:11 +0000 (-0700) Subject: Adjust tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5d9e1fd366294eecc356d6762c90aa4f67502ac;p=thirdparty%2Flibarchive.git Adjust tests --- diff --git a/libarchive/test/test_read_format_7zip_encryption_partially.c b/libarchive/test/test_read_format_7zip_encryption_partially.c index 07a5e2349..0d3f9149b 100644 --- a/libarchive/test/test_read_format_7zip_encryption_partially.c +++ b/libarchive/test/test_read_format_7zip_encryption_partially.c @@ -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. */ diff --git a/libarchive/test/test_read_format_rar5_bad_tables.c b/libarchive/test/test_read_format_rar5_bad_tables.c index 346a9ffdc..cb64face6 100644 --- a/libarchive/test/test_read_format_rar5_bad_tables.c +++ b/libarchive/test/test_read_format_rar5_bad_tables.c @@ -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));