Richard W.M. Jones
2018-Jun-06 19:12 UTC
[Libguestfs] [PATCH nbdkit] tests: xz: Use 16M block size when preparing disk for xz plugin test.
FYI; I'm going to push this because it's such an obvious fix. Rich.
Richard W.M. Jones
2018-Jun-06 19:12 UTC
[Libguestfs] [PATCH nbdkit] tests: xz: Use 16M block size when preparing disk for xz plugin test.
In a recent commit guestfish changed the default size for disk images prepared using the -N parameter from 100M to 1G: https://github.com/libguestfs/libguestfs/commit/adc23829e4b128562c2c29d984654528bd259644 For the xz plugin test we prepared a disk image using guestfish and then xz-compressing the output, but we did not take our own advice and use the --block-size parameter to limit the xz block size. Because of the increased size of the disk as a whole, this pushed the block size beyond the limit that the xz plugin can handle, and the test would fail with: nbdkit: error: /var/tmp/nbdkit-1.3.1/tests/disk.xz: xz file largest block is bigger than maxblock Either recompress the xz file with smaller blocks (see nbdkit-xz-plugin(1)) or make maxblock parameter bigger. maxblock = 536870912 (bytes) largest block in xz file = 1073741824 (bytes) Simple fix by adding the --block-size parameter. Note that to see the effect of this change you will need to ‘make maintainer-clean’ or remove the files ‘tests/disk’ and ‘tests/disk.xz’ by hand. --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 4582120..0cc2618 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -328,7 +328,7 @@ test_xz_LDADD = libtest.la $(LIBGUESTFS_LIBS) disk.xz: disk rm -f $@ - xz --best -c disk > $@ + xz --best --block-size=16777216 -c disk > $@ endif HAVE_GUESTFISH endif HAVE_LIBLZMA -- 2.15.1
Reasonably Related Threads
- [PATCH nbdkit] tests: xz: Use 16M block size when preparing disk for xz plugin test.
- [PATCH nbdkit v2 0/3] Rewrite xz plugin as a filter.
- [PATCH nbdkit 0/2] Rewrite xz plugin as a filter.
- [nbdkit PATCH v2] tests: Skip guestfs code on CentOS 6
- [PATCH nbdkit 0/4] plugins: Add new "ext2" plugin, for accessing ext2, ext3 or ext4 filesystems.