render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d89b3e
From 4841f815fcefb0a2e8715808bb4038c89e3b3889 Mon Sep 17 00:00:00 2001
d89b3e
Message-Id: <4841f815fcefb0a2e8715808bb4038c89e3b3889@dist-git>
d89b3e
From: Michal Privoznik <mprivozn@redhat.com>
d89b3e
Date: Mon, 23 Feb 2015 08:20:02 +0100
d89b3e
Subject: [PATCH] qemuxml2argvtest: Fake response from numad
d89b3e
d89b3e
RHEL-7.2: https://bugzilla.redhat.com/show_bug.cgi?id=1191567
d89b3e
RHEL-7.1.z: https://bugzilla.redhat.com/show_bug.cgi?id=1194982
d89b3e
d89b3e
Well, we can pretend that we've asked numad for its suggestion and let
d89b3e
qemu command line be built with that respect. Again, this alone has no
d89b3e
big value, but see later commits which build on the top of this.
d89b3e
d89b3e
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
d89b3e
(cherry picked from commit 38064806966c04d7cf7525cd78aa6f82bd09e6d0)
d89b3e
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
d89b3e
d89b3e
Conflicts:
d89b3e
	tests/qemuxml2argvtest.c: Context, as f7afeddc is not
d89b3e
        backported yet.
d89b3e
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
d89b3e
---
d89b3e
 tests/qemuxml2argvtest.c | 7 ++++++-
d89b3e
 1 file changed, 6 insertions(+), 1 deletion(-)
d89b3e
d89b3e
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
d89b3e
index 595b658..98bb9ad 100644
d89b3e
--- a/tests/qemuxml2argvtest.c
d89b3e
+++ b/tests/qemuxml2argvtest.c
d89b3e
@@ -279,12 +279,16 @@ static int testCompareXMLToArgvFiles(const char *xml,
d89b3e
     char *log = NULL;
d89b3e
     virCommandPtr cmd = NULL;
d89b3e
     size_t i;
d89b3e
+    virBitmapPtr nodeset = NULL;
d89b3e
 
d89b3e
     if (!(conn = virGetConnect()))
d89b3e
         goto out;
d89b3e
     conn->secretDriver = &fakeSecretDriver;
d89b3e
     conn->storageDriver = &fakeStorageDriver;
d89b3e
 
d89b3e
+    if (virBitmapParse("0-3", '\0', &nodeset, 4) < 0)
d89b3e
+        goto out;
d89b3e
+
d89b3e
     if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
d89b3e
                                         QEMU_EXPECTED_VIRT_TYPES,
d89b3e
                                         VIR_DOMAIN_XML_INACTIVE))) {
d89b3e
@@ -363,7 +367,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
d89b3e
                                      VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
d89b3e
                                      &testCallbacks, false,
d89b3e
                                      (flags & FLAG_FIPS),
d89b3e
-                                     NULL))) {
d89b3e
+                                     nodeset))) {
d89b3e
         if (!virtTestOOMActive() &&
d89b3e
             (flags & FLAG_EXPECT_FAILURE)) {
d89b3e
             ret = 0;
d89b3e
@@ -416,6 +420,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
d89b3e
     virCommandFree(cmd);
d89b3e
     virDomainDefFree(vmdef);
d89b3e
     virObjectUnref(conn);
d89b3e
+    virBitmapFree(nodeset);
d89b3e
     return ret;
d89b3e
 }
d89b3e
 
d89b3e
-- 
d89b3e
2.3.0
d89b3e