[PATCH 03/10] testQemuGetRealCaps: Strip the default machine alias before insertion into cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Expand the default machine type alias of the 'latest' capabilities for
an architecture before caching it rather than after copying it, so that
we don't duplicate the work all the time.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/testutilsqemu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
index b75241d545..40c2cb8bba 100644
--- a/tests/testutilsqemu.c
+++ b/tests/testutilsqemu.c
@@ -931,14 +931,14 @@ testQemuGetRealCaps(const char *arch,
             return NULL;
         }

+        if (stripmachinealiases)
+            virQEMUCapsStripMachineAliases(cachedcaps);
+
         g_hash_table_insert(capsCache, g_strdup(capsfile), cachedcaps);
     }

     ret = virQEMUCapsNewCopy(cachedcaps);

-    if (stripmachinealiases)
-        virQEMUCapsStripMachineAliases(ret);
-
     /* strip 'xml' suffix so that we can format the file to '.replies' */
     capsfile[strlen(capsfile) - 3] = '\0';

-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux