summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-07-13 16:24:38 -0600
committerEric Blake <eblake@redhat.com>2011-07-15 12:22:20 -0600
commit461e0f1a2df4fd0cd2e16d38bb2847cf7be9a365 (patch)
tree90f20a0058a57b308c8eeaaa34e430900a1d36cd /src/test
parentmaint: fix typos (diff)
downloadlibvirt-461e0f1a2df4fd0cd2e16d38bb2847cf7be9a365.tar.gz
libvirt-461e0f1a2df4fd0cd2e16d38bb2847cf7be9a365.tar.bz2
libvirt-461e0f1a2df4fd0cd2e16d38bb2847cf7be9a365.zip
flags: use common dumpxml flags check
The previous patches only cleaned up ATTRIBUTE_UNUSED flags cases; auditing the drivers found other places where flags was being used but not validated. In particular, domainGetXMLDesc had issues with clients accepting a different set of flags than the common virDomainDefFormat helper function. * src/conf/domain_conf.c (virDomainDefFormat): Add common flag check. * src/uml/uml_driver.c (umlDomainAttachDeviceFlags) (umlDomainDetachDeviceFlags): Reject unknown flags. * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc) (vboxDomainAttachDeviceFlags) (vboxDomainDetachDeviceFlags): Likewise. * src/qemu/qemu_driver.c (qemudDomainMemoryPeek): Likewise. (qemuDomainGetXMLDesc): Document common flag handling. * src/libxl/libxl_driver.c (libxlDomainGetXMLDesc): Likewise. * src/lxc/lxc_driver.c (lxcDomainGetXMLDesc): Likewise. * src/openvz/openvz_driver.c (openvzDomainGetXMLDesc): Likewise. * src/phyp/phyp_driver.c (phypDomainGetXMLDesc): Likewise. * src/test/test_driver.c (testDomainGetXMLDesc): Likewise. * src/vmware/vmware_driver.c (vmwareDomainGetXMLDesc): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainGetXMLDesc): Likewise.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_driver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index f3fb320f2..064a1cdee 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2366,6 +2366,8 @@ static char *testDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
virDomainObjPtr privdom;
char *ret = NULL;
+ /* Flags checked by virDomainDefFormat */
+
testDriverLock(privconn);
privdom = virDomainFindByName(&privconn->domains,
domain->name);