[PATCH 11/12] tests: qemuxml2xml: Wire up QEMUCaps usage

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

 



Future changes will make some of these tests dependent on specific
QEMUCaps flags, so wire up the basic handling.
---
 tests/qemuxml2xmltest.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index c0270d4..32c9fed 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -37,6 +37,8 @@ struct testInfo {
 
     char *outInactiveName;
     char *outInactiveFile;
+
+    virQEMUCapsPtr qemuCaps;
 };
 
 static int
@@ -216,6 +218,8 @@ testInfoFree(struct testInfo *info)
 
     VIR_FREE(info->outInactiveName);
     VIR_FREE(info->outInactiveFile);
+
+    virObjectUnref(info->qemuCaps);
 }
 
 
@@ -225,6 +229,13 @@ testInfoSet(struct testInfo *info,
             bool different,
             int when)
 {
+    if (!(info->qemuCaps = virQEMUCapsNew()))
+        goto error;
+
+    if (qemuTestCapsCacheInsert(driver.qemuCapsCache, name,
+                                info->qemuCaps) < 0)
+        goto error;
+
     if (virAsprintf(&info->inName, "%s/qemuxml2argvdata/qemuxml2argv-%s.xml",
                     abs_srcdir, name) < 0)
         goto error;
-- 
2.5.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]