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 <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2015-02-12 17:39:34 +01:00
parent 65c0fd9dfc
commit 3806480696

View File

@ -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;
}