]> xenbits.xensource.com Git - libvirt.git/commit
tests: be more explicit on qcow2 versions in virstoragetest
authorEric Blake <eblake@redhat.com>
Tue, 17 Dec 2013 23:28:20 +0000 (16:28 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 15 Jan 2014 16:19:14 +0000 (09:19 -0700)
commit974e5914522099ba4d463e24941289b785fe2096
treed1218a5ea3c6f24fca548091131799628db0ab0a
parent908903b317431958234fde658c0eb75f18981129
tests: be more explicit on qcow2 versions in virstoragetest

While working on v1.0.5-maint (the branch in use on Fedora 19)
with the host at Fedora 20, I got a failure in virstoragetest.
I traced it to the fact that we were using qemu-img to create a
qcow2 file, but qemu-img changed from creating v2 files by
default in F19 to creating v3 files in F20.  Rather than leaving
it up to qemu-img, it is better to write the test to force
testing of BOTH file formats (better code coverage and all).

This patch alone does not fix all the failures in v1.0.5-maint;
for that, we must decide to either teach the older branch to
understand v3 files, or to reject them outright as unsupported.
But for upstream, making the test less dependent on changing
qemu-img defaults is always a good thing.

* tests/virstoragetest.c (testPrepImages): Simplify creation of
raw file; check if qemu supports compat and if so use it.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests/virstoragetest.c