Permalink
Browse files

Fix test_archive_write_add_filter_by_name_lrzip test case.

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
  • Loading branch information...
1 parent 21b21bc commit d767d7904781794442938df6b0dd29c8da325e03 @amejia1 amejia1 committed Feb 24, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 libarchive/test/test_archive_write_add_filter_by_name.c
@@ -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));

0 comments on commit d767d79

Please sign in to comment.