]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix test_archive_write_add_filter_by_name_lrzip test case.
authorAndres Mejia <amejia004@gmail.com>
Sun, 24 Feb 2013 18:06:28 +0000 (13:06 -0500)
committerAndres Mejia <amejia004@gmail.com>
Sun, 24 Feb 2013 18:06:28 +0000 (13:06 -0500)
There's some bug in lrzip where small files cannot use 2nd stage
compression.
See http://ck-hack.blogspot.com/2012/03/lrzip-0612.html?showComment=1337356929450#c3154145708572533571

libarchive/test/test_archive_write_add_filter_by_name.c

index 68b3ce60b7c54f01c7e0aaba019b3970b7458e45..a8cc8b3391fc9c458d267ea67403b8175bf7f241 100644 (file)
@@ -70,6 +70,16 @@ test_filter_by_name(const char *filter_name, int filter_code,
                        return;
                }
        }
+       if (filter_code == ARCHIVE_FILTER_LRZIP)
+       {
+               /*
+                * There's a bug in lrzip (as of release 0.612) where 2nd stage
+                * compression can't be performed on smaller files. Set lrzip to
+                * use no 2nd stage compression.
+                */
+               assertEqualIntA(a, ARCHIVE_OK,
+                       archive_write_set_options(a, "lrzip:compression=none"));
+       }
        assertEqualIntA(a, ARCHIVE_OK, archive_write_set_bytes_per_block(a, 10));
        assertEqualIntA(a, ARCHIVE_OK,
            archive_write_open_memory(a, buff, buffsize, &used));