]> git.ipfire.org Git - thirdparty/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 17:16:25 +0000 (10:16 -0700)
commit73470fe219ca31b6d76831385b156434e14ea446
treebc7ced4385a1e102aa21ea35141d4eb8ee008d65
parent2d2bd72dc42e8b690ef856997b1c01f947d97a7b
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>
(cherry picked from commit 974e5914522099ba4d463e24941289b785fe2096)

Conflicts:
tests/virstoragetest.c - hardcode test to v2, since this branch doesn't handle v3 correctly
tests/virstoragetest.c