diff mbox

[6/6] tests: qemuxml2xml: Wire up QEMUCaps usage

Message ID 93bd7526f661f2d25fdb31155782b3895428baf0.1452298382.git.crobinso@redhat.com
State Accepted
Commit 8d48ce02c3012581efb74b08834788543afc2092
Headers show

Commit Message

Cole Robinson Jan. 9, 2016, 12:13 a.m. UTC
Future changes will make some of these tests dependent on specific
QEMUCaps flags, so wire up the basic handling. Flags will be added
in future patches.
---
 tests/qemuxml2xmltest.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.5.0

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

Patch

diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 9482f6c..ab20fca 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -32,6 +32,8 @@  struct testInfo {
     char *inName;
     char *outActiveName;
     char *outInactiveName;
+
+    virQEMUCapsPtr qemuCaps;
 };
 
 static int
@@ -171,6 +173,8 @@  testInfoFree(struct testInfo *info)
     VIR_FREE(info->inName);
     VIR_FREE(info->outActiveName);
     VIR_FREE(info->outInactiveName);
+
+    virObjectUnref(info->qemuCaps);
 }
 
 
@@ -180,6 +184,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;