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