[PATCH 15/31] qemuhotplugtest: Don't fetch capabilities when they are not used

Peter Krempa pkrempa at redhat.com
Thu Mar 30 13:38:09 UTC 2023


Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 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;
 }
-- 
2.39.2



More information about the libvir-list mailing list