From: Michal Privoznik Date: Thu, 12 Feb 2015 16:39:34 +0000 (+0100) Subject: qemuxml2argvtest: Fake response from numad X-Git-Tag: v1.2.13-rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38064806966c04d7cf7525cd78aa6f82bd09e6d0;p=thirdparty%2Flibvirt.git qemuxml2argvtest: Fake response from numad Well, we can pretend that we've asked numad for its suggestion and let qemu command line be built with that respect. Again, this alone has no big value, but see later commits which build on the top of this. Signed-off-by: Michal Privoznik --- diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 316f4793a6..2de92ebfc3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -265,12 +265,16 @@ static int testCompareXMLToArgvFiles(const char *xml, size_t i; size_t nnicindexes = 0; int *nicindexes = NULL; + virBitmapPtr nodeset = NULL; if (!(conn = virGetConnect())) goto out; conn->secretDriver = &fakeSecretDriver; conn->storageDriver = &fakeStorageDriver; + if (virBitmapParse("0-3", '\0', &nodeset, 4) < 0) + goto out; + if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt, QEMU_EXPECTED_VIRT_TYPES, VIR_DOMAIN_DEF_PARSE_INACTIVE))) { @@ -349,7 +353,7 @@ static int testCompareXMLToArgvFiles(const char *xml, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP, &testCallbacks, false, (flags & FLAG_FIPS), - NULL, &nnicindexes, &nicindexes))) { + nodeset, &nnicindexes, &nicindexes))) { if (!virtTestOOMActive() && (flags & FLAG_EXPECT_FAILURE)) { ret = 0; @@ -403,6 +407,7 @@ static int testCompareXMLToArgvFiles(const char *xml, virCommandFree(cmd); virDomainDefFree(vmdef); virObjectUnref(conn); + virBitmapFree(nodeset); return ret; }