mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
qemuhotplugtest: Don't fetch capabilities when they are not used
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d8ea6a391b
commit
578c2a0cc7
@ -319,7 +319,6 @@ testQemuHotplug(const void *data)
|
||||
unsigned int device_parse_flags = 0;
|
||||
virDomainObj *vm = NULL;
|
||||
virDomainDeviceDef *dev = NULL;
|
||||
g_autoptr(virCaps) caps = NULL;
|
||||
g_autoptr(qemuMonitorTest) test_mon = NULL;
|
||||
qemuDomainObjPrivate *priv = NULL;
|
||||
|
||||
@ -339,9 +338,6 @@ testQemuHotplug(const void *data)
|
||||
virTestLoadFile(result_filename, &result_xml) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(caps = virQEMUDriverGetCapabilities(&driver, false)))
|
||||
goto cleanup;
|
||||
|
||||
if (test->vm) {
|
||||
vm = test->vm;
|
||||
if (!vm->def) {
|
||||
@ -480,7 +476,6 @@ testQemuHotplugCpuPrepare(const char *test,
|
||||
GHashTable *qmpschema)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = NULL;
|
||||
virCaps *caps = NULL;
|
||||
g_autofree char *prefix = NULL;
|
||||
struct testQemuHotplugCpuData *data = NULL;
|
||||
|
||||
@ -501,9 +496,6 @@ testQemuHotplugCpuPrepare(const char *test,
|
||||
if (qemuHotplugCreateObjects(driver.xmlopt, &data->vm, data->xml_dom) < 0)
|
||||
goto error;
|
||||
|
||||
if (!(caps = virQEMUDriverGetCapabilities(&driver, false)))
|
||||
goto error;
|
||||
|
||||
/* create vm->newDef */
|
||||
data->vm->persistent = true;
|
||||
if (virDomainObjSetDefTransient(driver.xmlopt, data->vm, NULL) < 0)
|
||||
@ -533,7 +525,6 @@ testQemuHotplugCpuPrepare(const char *test,
|
||||
return data;
|
||||
|
||||
error:
|
||||
virObjectUnref(caps);
|
||||
testQemuHotplugCpuDataFree(data);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user