libvirt/tests
Eric Blake 979d1bac9f 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 974e591452)

Conflicts:
	tests/virstoragetest.c - hardcode test to v2, since this branch doesn't handle v3 correctly
2014-01-15 10:27:03 -07:00
..
capabilityschemadata capabilities: add NUMA memory information 2013-03-08 11:51:00 -07:00
commanddata build: clean up stray files found by 'make distcheck' 2013-05-06 14:09:11 -06:00
confdata
cputestdata
domainschemadata Add XML config for resource partitions 2013-04-15 17:35:31 +01:00
domainsnapshotxml2xmlin snapshot: new XML for external system checkpoint 2012-11-02 09:56:23 -06:00
domainsnapshotxml2xmlout qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
interfaceschemadata
lxcxml2xmldata LXC: Fix handling of RAM filesystem size units 2013-10-15 13:26:55 +02:00
lxcxml2xmloutdata LXC: Fix handling of RAM filesystem size units 2013-10-15 13:26:55 +02:00
networkxml2confdata Revert "Add support for <option> tag in network config" 2013-02-27 10:55:24 -05:00
networkxml2xmlin network: support <driver name='vfio'/> in network definitions 2013-04-26 21:51:12 -04:00
networkxml2xmlout network: support <driver name='vfio'/> in network definitions 2013-04-26 21:51:12 -04:00
nodedevschemadata
nodeinfodata nodeinfotest: Add test data from a AMD bulldozer machine. 2012-11-13 00:35:36 +01:00
nwfilterxml2xmlin
nwfilterxml2xmlout
qemuhelpdata Revert "qemu: detect multi-head qxl via more than version check" 2013-03-25 08:38:35 -06:00
qemuxml2argvdata conf: don't crash on a tpm device with no backends 2013-05-09 14:57:00 +02:00
qemuxml2xmloutdata qemu: auto-add bridges and allow using them 2013-04-25 13:19:40 +02:00
qemuxmlnsdata qemu: pass -usb and usb hubs earlier, so USB disks with static address are handled properly 2012-10-30 08:54:32 +01:00
securityselinuxlabeldata Add a test suite for validating SELinux labelling 2013-01-14 13:40:04 +00:00
sexpr2xmldata storage: treat 'aio' like 'raw' at parse time 2012-10-19 17:35:09 -06:00
storagepoolxml2xmlin New XML attributes for storage pool source adapter 2013-04-08 18:41:06 +08:00
storagepoolxml2xmlout New XML attributes for storage pool source adapter 2013-04-08 18:41:06 +08:00
storagevolxml2argvdata storage: move qemu-img options before positional arguments 2013-02-24 18:11:40 +01:00
storagevolxml2xmlin
storagevolxml2xmlout
sysinfodata Implement minimal sysinfo for ARM platforms 2013-04-04 11:07:31 +01:00
vmx2xmldata
xencapsdata
xmconfigdata
xml2sexprdata
xml2vmxdata util: Change virMacAddrFormat to lowercase hex characters 2013-04-02 15:53:43 +02:00
.valgrind.supp valgrind: Adjust the suppression file 2013-02-07 14:08:14 -05:00
capabilityschematest
commandhelper.c tests: uniformly report test failures 2013-02-25 17:38:11 -07:00
commandtest.c build: clean up stray files found by 'make distcheck' 2013-05-06 14:09:11 -06:00
cpuset use virBitmap to store cpumask info. 2012-09-17 14:59:37 -04:00
cputest.c Rename xml.{c,h} to virxml.{c,h} 2012-12-21 11:19:50 +00:00
define-dev-segfault
domainschematest LXC: Fix handling of RAM filesystem size units 2013-10-15 13:26:55 +02:00
domainsnapshotschematest
domainsnapshotxml2xmltest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
esxutilstest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
eventtest.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
int-overflow
interfaceschematest
interfacexml2xmltest.c
jsontest.c Rename json.{c,h} to virjson.{c,h} 2012-12-21 11:17:13 +00:00
libvirtd-fail
libvirtd-pool
libvirtdconftest.c Convert HAVE_SASL to WITH_SASL 2013-01-11 11:03:23 +00:00
lxcxml2xmltest.c LXC: Fix handling of RAM filesystem size units 2013-10-15 13:26:55 +02:00
Makefile.am build: Add lxc testcase to dist list 2013-10-15 15:17:33 +02:00
networkschematest
networkxml2conftest.c Enforce return check on virAsprintf() calls 2013-01-30 14:42:22 -07:00
networkxml2xmltest.c use client id for IPv6 DHCP host definition 2013-02-25 02:49:06 -05:00
nodedevschematest
nodedevxml2xmltest.c
nodeinfotest.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
nwfilterschematest
nwfilterxml2xmltest.c Remove virConnectPtr arg from virNWFilterDefParse* 2013-10-07 09:53:23 -04:00
object-locking.ml Rename 'DeviceMonitor' to 'NodeDeviceDriver' 2013-04-24 10:59:53 +01:00
oomtrace.pl
openvzutilstest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
openvzutilstest.conf
pkix_asn1_tab.c
qemuargv2xmltest.c qemu: Add command line builder and parser for NVRAM. 2013-04-25 16:50:45 +08:00
qemuhelptest.c caps: use -device for primary video when qemu >=1.6 2013-07-29 16:43:05 -06:00
qemumonitorjsontest.c test: Add JSON test for query-tpm-types 2013-04-26 08:33:44 -04:00
qemumonitortest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
qemumonitortestutils.c docs: fix usage of 'onto' 2013-04-19 14:31:16 -06:00
qemumonitortestutils.h maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption 2013-04-04 22:18:56 +02:00
qemuxml2argvtest.c conf: don't crash on a tpm device with no backends 2013-05-09 14:57:00 +02:00
qemuxml2xmltest.c qemu: use vfio-pci on commandline when appropriate 2013-04-25 21:28:10 -04:00
qemuxmlnstest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
read-bufsiz
read-non-seekable
reconnect.c Rename command.{c,h} to vircommand.{c,h} 2012-12-21 11:17:13 +00:00
schematestutils.sh tests: use portable shell code 2013-05-17 21:40:49 -06:00
seclabeltest.c tests: uniformly report test failures 2013-02-25 17:38:11 -07:00
securityselinuxhelper.c securityselinuxhelper.c: Don't try to include xattr.h if not available 2013-01-14 21:00:51 +01:00
securityselinuxlabeltest.c virCaps: get rid of defaultDiskDriverName 2013-04-04 22:42:38 +02:00
securityselinuxtest.c Fix parsing of SELinux ranges without a category 2013-03-14 12:42:21 +00:00
sexpr2xmltest.c Turn virCapabilities into a virObject 2013-02-08 11:34:26 +00:00
shunloadhelper.c syntax-check: Only allows to include public headers in external tools 2013-04-18 11:31:19 +08:00
shunloadtest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
sockettest.c Rename memory.{c,h} to viralloc.{c,h} 2012-12-21 11:17:14 +00:00
ssh.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
start
statstest.c Rename stats_linux.{c,h} to virstatslinux.{c,h} 2012-12-21 11:19:48 +00:00
storagebackendsheepdogtest.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storagepoolschematest
storagepoolxml2xmltest.c New XML attributes for storage pool source adapter 2013-04-08 18:41:06 +08:00
storagevolschematest
storagevolxml2argvtest.c tests: fix leaks in storagevolxml2argvtest 2013-02-27 10:11:52 +01:00
storagevolxml2xmltest.c Remove spurious whitespace between function name & open brackets 2012-11-02 13:36:49 +00:00
sysinfotest.c Implement minimal sysinfo for ARM platforms 2013-04-04 11:07:31 +01:00
test_conf.c rename tests/conftest.c 2013-03-19 13:13:28 -06:00
test_conf.sh rename tests/conftest.c 2013-03-19 13:13:28 -06:00
test-lib.sh tests: simplify formatting 2011-07-11 09:21:37 -06:00
testutils.c viralloc: Export virAllocTest* 2013-03-22 12:45:14 +01:00
testutils.h Ensure LD_PRELOAD exists before running test case 2013-04-05 10:41:46 +01:00
testutilslxc.c virCaps: get rid of defaultConsoleTargetType callback 2013-04-04 22:42:39 +02:00
testutilslxc.h
testutilsqemu.c virCaps: get rid of defaultConsoleTargetType callback 2013-04-04 22:42:39 +02:00
testutilsqemu.h maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption 2013-04-04 22:18:56 +02:00
testutilsxen.c virCaps: get rid of defaultConsoleTargetType callback 2013-04-04 22:42:39 +02:00
testutilsxen.h virCaps: get rid of defaultConsoleTargetType callback 2013-04-04 22:42:39 +02:00
utiltest.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
vcpupin
viratomictest.c Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virauthconfigtest.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virbitmaptest.c Resolve valgrind error 2013-04-16 07:13:43 -04:00
virbuftest.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
vircgroupmock.c Do proper escaping of cgroup resource partitions 2013-04-26 13:52:02 +01:00
vircgrouptest.c Do proper escaping of cgroup resource partitions 2013-04-26 13:52:02 +01:00
virdrivermoduletest.c drivermodule: Ignore coverity warning about leaked_storage 2013-02-16 07:44:34 -05:00
virendiantest.c util: add virendian.h macros 2013-02-12 09:00:15 -07:00
virhashdata.h
virhashtest.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
viridentitytest.c Define internal APIs for managing identities 2013-03-19 13:37:37 +00:00
virkeycodetest.c Add a test suite for keycode mapping functions 2013-04-08 10:03:20 +01:00
virkeyfiletest.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virlockspacetest.c Check return on mkdir for LOCKSPACE_DIR 2013-01-04 10:57:09 -07:00
virnetmessagetest.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetsockettest.c virnetsockettest: Need to initialize 'path' 2013-01-22 17:29:25 +01:00
virnettlscontexttest.c Fix TLS tests with gnutls 3 2013-03-04 17:42:16 +00:00
virportallocatortest.c Avoid cast alignment warnings in port allocator test 2013-04-08 10:03:21 +01:00
virsh-all Don't check the 'connect' command in virsh-all test 2012-08-07 11:59:08 +01:00
virsh-optparse virsh: add snapshot-create-as memspec support 2012-11-07 09:04:18 -07:00
virsh-schedinfo Allow multiple parameters for schedinfo 2013-04-03 08:49:30 +02:00
virsh-synopsis
virsh-undefine build: avoid confusing make with raw name 'undefine' 2012-09-12 11:27:22 -06:00
virshtest.c Rename xml.{c,h} to virxml.{c,h} 2012-12-21 11:19:50 +00:00
virstoragetest.c tests: be more explicit on qcow2 versions in virstoragetest 2014-01-15 10:27:03 -07:00
virstringtest.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virt-aa-helper-test add vnc unix sockets to apparmor policy 2012-12-11 14:32:39 -07:00
virtimetest.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
viruritest.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
vmx2xmltest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00
xencapstest.c Turn virCapabilities into a virObject 2013-02-08 11:34:26 +00:00
xmconfigtest.c virCaps: get rid of defaultConsoleTargetType callback 2013-04-04 22:42:39 +02:00
xml2sexprtest.c virCaps: get rid of defaultConsoleTargetType callback 2013-04-04 22:42:39 +02:00
xml2vmxtest.c cleanup: Only include testutils.h once 2013-04-17 15:41:04 +08:00