From: Tim Kientzle Date: Fri, 23 Oct 2015 15:11:44 +0000 (-0700) Subject: It seems we can no longer rely on getting WARN back when X-Git-Tag: v3.1.900a~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14dc0d2787792ff4ca545711c9b58d2cc6ece2ba;p=thirdparty%2Flibarchive.git It seems we can no longer rely on getting WARN back when character-set conversion is inexact. Change this test to reflect the current realities. --- diff --git a/libarchive/test/test_compat_pax_libarchive_2x.c b/libarchive/test/test_compat_pax_libarchive_2x.c index 6ea25e4d2..4830d9e43 100644 --- a/libarchive/test/test_compat_pax_libarchive_2x.c +++ b/libarchive/test/test_compat_pax_libarchive_2x.c @@ -119,13 +119,20 @@ DEFINE_TEST(test_compat_pax_libarchive_2x) archive_read_open_filename(a, refname, 10240)); /* We cannot correctly read the filename. */ - assertEqualIntA(a, ARCHIVE_WARN, archive_read_next_header(a, &ae)); + // This test used to look for WARN here coming from a + // character-conversion failure. But: Newer iconv tables are + // more tolerant so we can't always detect the conversion + // failures. + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); assert(strcmp("\xd0\xd2\xc9\xd7\xc5\xd4", archive_entry_pathname(ae)) != 0); assertEqualInt(6, archive_entry_size(ae)); /* We cannot correctly read the filename. */ - assertEqualIntA(a, ARCHIVE_WARN, archive_read_next_header(a, &ae)); + // Same here: The test is still valid (it sill verifies that + // the converted pathname is different), but we can no longer + // rely on WARN here. + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); assert(strcmp("\xf0\xf2\xe9\xf7\xe5\xf4", archive_entry_pathname(ae)) != 0); assertEqualInt(6, archive_entry_size(ae));