]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Merge r2811 from trunk: Don't try to verify that compression-level=0
authorTim Kientzle <kientzle@gmail.com>
Sun, 5 Dec 2010 20:30:23 +0000 (15:30 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 5 Dec 2010 20:30:23 +0000 (15:30 -0500)
produces larger results than the default compression, since this isn't
true for all versions of liblzma.

SVN-Revision: 2812

libarchive/test/test_write_compress_lzma.c
libarchive/test/test_write_compress_xz.c

index 0b456910daeb5badfb9b273436280087bdc7bb27..30e1b7eae9506825b3bfb4b64ac2c5080a550090 100644 (file)
@@ -185,10 +185,15 @@ DEFINE_TEST(test_write_compress_lzma)
        archive_write_close(a);
        assert(0 == archive_write_finish(a));
 
-       /* Level 0 really does result in larger data. */
+       /* It would be nice to assert that compression-level=0 produced
+        * consistently larger/smaller results than the default compression,
+        * but the results here vary a lot depending on the version of liblzma
+        * being used. */
+       /* 
        failure("Compression-level=0 wrote %d bytes; default wrote %d bytes",
            (int)used2, (int)used1);
        assert(used2 > used1);
+       */
 
        assert((a = archive_read_new()) != NULL);
        assertA(0 == archive_read_support_format_all(a));
index 88db2e66898453220e53f1d0dafa7e36bc19bc57..d5c4c951ba8115531980af9f6d33122943c7043a 100644 (file)
@@ -193,10 +193,14 @@ DEFINE_TEST(test_write_compress_xz)
        archive_write_close(a);
        assert(0 == archive_write_finish(a));
 
-       /* Level 0 really does result in larger data. */
+       /* I would like to assert that compression-level=0 results in
+        * larger data than the default compression, but that's not true
+        * for all versions of liblzma. */
+       /*
        failure("Compression-level=0 wrote %d bytes; default wrote %d bytes",
            (int)used2, (int)used1);
        assert(used2 > used1);
+       */
 
        assert((a = archive_read_new()) != NULL);
        assertA(0 == archive_read_support_format_all(a));