提交 38064806 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 65c0fd9d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册