libvirt/tests
Eric Blake 232a31bea3 blockcommit: track job type in xml
A future patch is going to wire up qemu active block commit jobs;
but as they have similar events and are canceled/pivoted in the
same way as block copy jobs, it is easiest to track all bookkeeping
for the commit job by reusing the <mirror> element.  This patch
adds domain XML to track which job was responsible for creating a
mirroring situation, and adds a job='copy' attribute to all
existing uses of <mirror>.  Along the way, it also massages the
qemu monitor backend to read the new field in order to generate
the correct type of libvirt job (even though it requires a
future patch to actually cause a qemu event that can be reported
as an active commit).  It also prepares to update persistent XML
to match changes made to live XML when a copy completes.

* docs/schemas/domaincommon.rng: Enhance schema.
* docs/formatdomain.html.in: Document it.
* src/conf/domain_conf.h (_virDomainDiskDef): Add a field.
* src/conf/domain_conf.c (virDomainBlockJobType): String conversion.
(virDomainDiskDefParseXML): Parse job type.
(virDomainDiskDefFormat): Output job type.
* src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Distinguish
active from regular commit.
* src/qemu/qemu_driver.c (qemuDomainBlockCopy): Set job type.
(qemuDomainBlockPivot, qemuDomainBlockJobImpl): Clean up job type
on completion.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml:
Update tests.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise.
* tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml: New
file.
* tests/qemuxml2xmltest.c (mymain): Drive new test.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-07-30 06:32:38 -06:00
..
bhyvexml2argvdata bhyve: cdrom support 2014-07-24 18:56:37 +04:00
bhyvexml2xmloutdata tests: add bhyve xml2xml test 2014-04-08 20:50:36 +04:00
capabilityschemadata
commanddata
confdata
cputestdata
domaincapsschemadata qemu: Implement virConnectGetDomainCapabilities 2014-07-03 12:22:38 +02:00
domainconfdata
domainschemadata lxc: allow to keep or drop capabilities 2014-07-23 15:12:37 +08:00
domainsnapshotxml2xmlin conf: split <disk> schema into more pieces 2014-04-16 10:45:55 +02:00
domainsnapshotxml2xmlout
fchostdata/fc_host
interfaceschemadata interface: clean up virInterfaceDefDevFormat 2014-06-20 11:50:41 +03:00
lxcconf2xmldata lxc domain from xml: convert lxc.cap.drop 2014-07-23 15:12:37 +08:00
lxcxml2xmldata Domain config: write <features/> if some capabilities are set. 2014-07-30 14:21:55 +02:00
lxcxml2xmloutdata
networkxml2confdata network: fix problems with SRV records 2014-03-26 16:42:43 +02:00
networkxml2firewalldata Add test for converting network XML to iptables rules 2014-04-25 15:44:09 +01:00
networkxml2xmlin
networkxml2xmlout
networkxml2xmlupdatein
networkxml2xmlupdateout
nodedevschemadata Add unique_id to nodedev output 2014-07-21 12:55:11 -04:00
nodeinfodata virNodeParseSocket: Take ARM into account 2014-06-20 15:59:08 +02:00
nwfilterxml2firewalldata Add a test suite for nwfilter ebiptables tech driver 2014-04-25 15:44:10 +01:00
nwfilterxml2xmlin
nwfilterxml2xmlout
qemucapabilitiesdata qemu: newer -numa parameter capability probing 2014-07-16 20:15:46 +02:00
qemucaps2xmldata qemu: add unit tests for the capabilities xml 2014-03-26 13:41:25 +01:00
qemuhelpdata
qemuhotplugtestdata
qemumonitorjsondata
qemuxml2argvdata blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
qemuxml2xmloutdata blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
qemuxmlnsdata
secretxml2xmlin
securityselinuxhelperdata
securityselinuxlabeldata
sexpr2xmldata conf: Format and parse backing chains in domain XML 2014-04-24 16:06:18 +02:00
storagepoolschemadata
storagepoolxml2xmlin storage: Introduce parentaddr into virStoragePoolSourceAdapter 2014-07-21 12:55:10 -04:00
storagepoolxml2xmlout storage: Introduce parentaddr into virStoragePoolSourceAdapter 2014-07-21 12:55:10 -04:00
storagevolschemadata
storagevolxml2argvdata add nocow test case 2014-07-16 13:35:26 +02:00
storagevolxml2xmlin add nocow test case 2014-07-16 13:35:26 +02:00
storagevolxml2xmlout add nocow test case 2014-07-16 13:35:26 +02:00
sysinfodata
vboxsnapshotxmldata tests: fix vbox snapshot xmls 2014-06-18 15:19:18 +02:00
vircaps2xmldata vircaps2xmltest: Introduce basic testing 2014-06-05 13:58:13 +02:00
virfiledata
virpcitestdata
virscsidata tests: Fix SCSI test data filenames for Windows 2014-03-29 21:14:15 +01:00
virusbtestdata/sys_bus_usb/devices
vmwareverdata vmware: make version parsing more robust 2014-06-11 14:56:18 +02:00
vmx2xmldata
xencapsdata
xmconfigdata
xml2sexprdata
xml2vmxdata
.valgrind.supp
bhyvexml2argvmock.c bhyve: add xml2args unittest 2014-03-27 08:33:41 +04:00
bhyvexml2argvtest.c bhyve: cdrom support 2014-07-24 18:56:37 +04:00
bhyvexml2xmltest.c tests: add bhyve xml2xml test 2014-04-08 20:50:36 +04:00
capabilityschematest
commandhelper.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
commandtest.c Coverity: Resolve a FORWARD_NULL 2014-03-25 17:13:27 -04:00
cpuset
cputest.c cpuCompare*: Add support for reporting failure on incompatible CPUs 2014-06-26 00:43:54 +02:00
define-dev-segfault
domaincapsschematest Introduce domain_capabilities 2014-07-03 12:22:37 +02:00
domaincapstest.c qemu: Implement virConnectGetDomainCapabilities 2014-07-03 12:22:38 +02:00
domainconftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
domainschematest schema: bhyve and nmdm updates 2014-07-29 09:52:16 +04:00
domainsnapshotschematest
domainsnapshotxml2xmltest.c Use virBufferCheckError everywhere we report OOM error 2014-07-03 10:48:14 +02:00
esxutilstest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
eventtest.c
fchosttest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
fdstreamtest.c Use virFileFindResource to locate iohelper for fdstream 2014-04-25 11:59:46 +01:00
int-overflow
interfaceschematest
interfacexml2xmltest.c
jsontest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
libvirtd-fail
libvirtd-pool
libvirtdconftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
lxcconf2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
lxcxml2xmltest.c Domain config: write <features/> if some capabilities are set. 2014-07-30 14:21:55 +02:00
Makefile.am tests: Remove stale scsihostdata dir 2014-07-22 11:10:57 +02:00
metadatatest.c test: metadata: Improve test coverage 2014-07-17 17:04:12 +02:00
networkschematest
networkxml2conftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
networkxml2firewalltest.c networkxml2firewalltest: fix build failure on freebsd 2014-04-30 10:16:09 +02:00
networkxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
networkxml2xmlupdatetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
nodedevschematest
nodedevxml2xmltest.c Add unique_id to nodedev output 2014-07-21 12:55:11 -04:00
nodeinfotest.c virNodeParseSocket: Take ARM into account 2014-06-20 15:59:08 +02:00
nwfilterebiptablestest.c nwfilter: Tear down temp. filters when tearing all filters 2014-04-30 12:51:38 -04:00
nwfilterschematest
nwfilterxml2firewalltest.c Add a test suite for nwfilter ebiptables tech driver 2014-04-25 15:44:10 +01:00
nwfilterxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
objecteventtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
objectlocking.ml
oomtrace.pl
openvzutilstest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
openvzutilstest.conf
pkix_asn1_tab.c
qemuagenttest.c qemu: Support mountpoints option of guest-fsfreeze-freeze 2014-05-12 21:24:23 -06:00
qemuargv2xmltest.c Utilize virDomainDiskAuth for domain disk 2014-07-03 17:39:15 -04:00
qemucapabilitiestest.c tests: Move qemu caps XML parsing into shared unit 2014-07-03 12:22:37 +02:00
qemucaps2xmltest.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
qemuhelptest.c qemu: add host-pci-multidomain capability 2014-05-06 14:32:33 +03:00
qemuhotplugtest.c qemuDomainAttachDeviceFlags: Parse device xml as inactive 2014-03-26 13:49:47 +01:00
qemumonitorjsontest.c qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemumonitortest.c
qemumonitortestutils.c tests: monitor: json: Fix error message when returning json in json 2014-06-03 17:19:24 +02:00
qemumonitortestutils.h
qemuxml2argvmock.c
qemuxml2argvtest.c qemu: Implement ./hugepages/page/[@size, @unit, @nodeset] 2014-07-29 12:14:52 +01:00
qemuxml2xmltest.c blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
qemuxmlnstest.c Use virFileFindResource to locate CPU map XML 2014-04-25 11:59:46 +01:00
read-bufsiz
read-non-seekable
reconnect.c
schematestutils.sh
scsihosttest.c scsi_host: Introduce virFindSCSIHostByPCI 2014-07-21 12:55:11 -04:00
seclabeltest.c
secretschematest
secretxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
securityselinuxhelper.c maint: cleanup detection of const'ness of selinux ctx 2014-05-28 16:52:48 -06:00
securityselinuxlabeltest.c securityselinuxlabeltest: Don't create dummy file in the srcdir 2014-07-01 16:45:35 +02:00
securityselinuxtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
sexpr2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
shunloadhelper.c
shunloadtest.c
sockettest.c
ssh.c
start
statstest.c util: virstatslinux: make more generic 2014-07-15 22:00:59 +04:00
storagebackendsheepdogtest.c conf: track sizes directly in source struct 2014-04-02 06:03:00 -06:00
storagepoolschematest
storagepoolxml2xmltest.c storage: Introduce parentaddr into virStoragePoolSourceAdapter 2014-07-21 12:55:10 -04:00
storagevolschematest
storagevolxml2argvtest.c add nocow test case 2014-07-16 13:35:26 +02:00
storagevolxml2xmltest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
sysinfotest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
test_conf.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
test_conf.sh
test-lib.sh
testutils.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
testutils.h Add test for converting network XML to iptables rules 2014-04-25 15:44:09 +01:00
testutilslxc.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
testutilslxc.h
testutilsqemu.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
testutilsqemu.h tests: Move qemu caps XML parsing into shared unit 2014-07-03 12:22:37 +02:00
testutilsxen.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
testutilsxen.h
utiltest.c
vboxsnapshotxmltest.c vboxsnapshotxmltest: Don't write to a file in abs_srcdir 2014-07-01 16:46:29 +02:00
vcpupin virsh: forbid negative vcpu argument to vcpupin 2014-06-12 14:06:21 +02:00
viralloctest.c Add test suite for viralloc APIs 2014-04-25 11:29:55 +01:00
viratomictest.c
virauthconfigtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virbitmaptest.c virbitmap: Introduce virBitmapOverlaps 2014-07-29 12:00:42 +01:00
virbuftest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vircaps2xmltest.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
vircapstest.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
vircgroupmock.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vircgrouptest.c Extend virCgroupGetPercpuStats to fill in vcputime too 2014-04-09 16:24:08 +02:00
vircryptotest.c
virdbustest.c Fix Memory Leak in testMessageArrayRef() 2014-03-31 14:56:17 -06:00
virdrivermoduletest.c Use virFileFindResource to locate driver plugins 2014-04-25 11:59:46 +01:00
virendiantest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virfiletest.c
virfirewalltest.c tests: skip virfirewalltest on non-Linux systems 2014-05-02 16:19:34 +04:00
virhashdata.h
virhashtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virhostdevtest.c tests: remove hostdevmgr directory on cleanup 2014-04-28 22:58:10 +02:00
viridentitytest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
viriscsitest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virkeycodetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virkeyfiletest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virkmodtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virlockspacetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virlogtest.c
virmock.h Conditionalize include of dlfcn.h in virmock.h 2014-04-25 15:48:30 +01:00
virmockdbus.c tests: avoid dlsym mocking on mingw 2014-05-20 15:16:22 -06:00
virnetdevbandwidthtest.c QoS: make tc filters match all traffic 2014-04-07 11:35:29 +02:00
virnetmessagetest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virnetserverclientmock.c
virnetserverclienttest.c
virnetsockettest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virnettlscontexttest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virnettlshelpers.c Fix assignment of comparison against zero 2014-07-16 09:39:57 +02:00
virnettlshelpers.h
virnettlssessiontest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virpcimock.c Replace Pci with PCI throughout 2014-04-08 11:15:55 +01:00
virpcitest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virportallocatortest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virscsitest.c tests: Fix SCSI test data filenames for Windows 2014-03-29 21:14:15 +01:00
virsh-all
virsh-optparse
virsh-schedinfo
virsh-synopsis
virsh-undefine
virsh-uriprecedence
virshtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virstoragetest.c util: storage: Return complete parent info from virStorageFileChainLookup 2014-07-09 11:41:34 +02:00
virstringtest.c util: string: Add helper to free non-NULL terminated string arrays 2014-06-24 10:45:43 +02:00
virsystemdtest.c tests: avoid dlsym mocking on mingw 2014-05-20 15:16:22 -06:00
virt-aa-helper-test Fix typos in src/* 2014-04-21 16:49:08 -06:00
virtimetest.c util: virTimeFieldsThenRaw never returns negative 2014-07-25 12:06:07 +02:00
viruritest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virusbmock.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
virusbtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
vmwarevertest.c vmware: make version parsing more robust 2014-06-11 14:56:18 +02:00
vmx2xmltest.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00
xencapstest.c
xmconfigtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
xml2sexprtest.c Indent top-level labels by one space in tests/ 2014-03-25 14:58:41 +01:00
xml2vmxtest.c capabilities: use bool instead of int 2014-07-14 08:00:46 -06:00