]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuTestDriverInit: Don't autopopulate qemu capabilities when initializing driver
authorPeter Krempa <pkrempa@redhat.com>
Tue, 4 Jul 2023 11:36:21 +0000 (13:36 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Jul 2023 13:23:52 +0000 (15:23 +0200)
In an effort to use strictly real capability testing all tests were
converted to do insertion of their own capabilities when required, thus
we don't need to popluate the capabilities. This will also promote using
proper capabilities based on what the test is trying to achieve.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/testutilsqemu.c

index e0b58b1d5d63de7ac174088c1c5c8cf76ba1785c..16b773a768c344b271a1e6d24b487d2838b91083 100644 (file)
@@ -428,7 +428,6 @@ int qemuTestDriverInit(virQEMUDriver *driver)
     virSecurityManager *mgr = NULL;
     char statedir[] = STATEDIRTEMPLATE;
     char configdir[] = CONFIGDIRTEMPLATE;
-    g_autoptr(virQEMUCaps) emptyCaps = NULL;
 
     memset(driver, 0, sizeof(*driver));
 
@@ -499,11 +498,6 @@ int qemuTestDriverInit(virQEMUDriver *driver)
     if (!driver->xmlopt)
         goto error;
 
-    /* Populate the capabilities cache with fake empty caps */
-    emptyCaps = virQEMUCapsNew();
-    if (qemuTestCapsCacheInsert(driver->qemuCapsCache, emptyCaps) < 0)
-        goto error;
-
     if (!(mgr = virSecurityManagerNew("none", "qemu",
                                       VIR_SECURITY_MANAGER_PRIVILEGED)))
         goto error;