From 578c2a0cc7269b2feca1a08f1c3afc8f4f34e314 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 9 Mar 2023 15:51:08 +0100 Subject: [PATCH] qemuhotplugtest: Don't fetch capabilities when they are not used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/qemuhotplugtest.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 6a36856d8a..804e32279d 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -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; }