sciurus/vagrant-mutate

Tests fail, files not matching

Closed this issue · 4 comments

qemu-img version: 2.1.0

Running the test suite I get

TESTS FAILED
These two files do not match <snip>/test/actual_output/virtualbox/boxes/mutate-test/0/kvm/box-disk1.img <snip>/test/expected_output/virtualbox/kvm/box-disk1.img
These two files do not match <snip>/test/actual_output/virtualbox/boxes/mutate-test/0/libvirt/box.img <snip>/test/expected_output/virtualbox/libvirt/box.img

Both failed tests produce the same diff:

--- actual
+++ expected
@@ -1 +1 @@
-0000000: 5146 49fb 0000 0003 0000 0000 0000 0000  QFI.............
+0000000: 5146 49fb 0000 0002 0000 0000 0000 0000  QFI.............

That's interesting; what does qemu-img info report for test/actual_output/virtualbox/boxes/mutate-test/0/kvm/box-disk1.img

image: box-disk1.img
file format: qcow2
virtual size: 4.0M (4194304 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

and qemu-img info for the expected box-disk1.img:

file format: qcow2
virtual size: 4.0M (4194304 bytes)
disk size: 148K
cluster_size: 65536
Format specific information:
    compat: 0.10

Thanks for that. Probably the default compat has changed from 1.0 to 1.1. I'll fix this by switching the qemu-img calls to explicitly set compat to 1.1 and updating the expected test output.

~$ test/test.rb
...
ALL TESTS PASSED

Thanks!