提交 1d6dcec0 编写于 作者: J Ján Tomko

testCompareDomXML2XMLFiles: add parseFlags parameter

Allow testing XML parsing with different flags.
上级 e4f1be7e
......@@ -33,7 +33,7 @@ testCompareXMLToXMLHelper(const void *data)
ret = testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, xml_in,
info->different ? xml_out : xml_in,
false,
NULL, NULL);
NULL, NULL, 0);
cleanup:
VIR_FREE(xml_in);
......
......@@ -40,7 +40,7 @@ testCompareXMLToXMLHelper(const void *data)
ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
info->different ? xml_out : xml_in,
!info->inactive_only,
NULL, NULL);
NULL, NULL, 0);
cleanup:
VIR_FREE(xml_in);
VIR_FREE(xml_out);
......
......@@ -45,7 +45,7 @@ testCompareXMLToXMLHelper(const void *data)
ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
info->different ? xml_out : xml_in,
!info->inactive_only,
NULL, NULL);
NULL, NULL, 0);
cleanup:
VIR_FREE(xml_in);
VIR_FREE(xml_out);
......
......@@ -54,7 +54,7 @@ testXML2XMLActive(const void *opaque)
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
info->inName, info->outActiveName, true,
qemuXML2XMLPreFormatCallback, opaque);
qemuXML2XMLPreFormatCallback, opaque, 0);
}
......@@ -65,7 +65,7 @@ testXML2XMLInactive(const void *opaque)
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName,
info->outInactiveName, false,
qemuXML2XMLPreFormatCallback, opaque);
qemuXML2XMLPreFormatCallback, opaque, 0);
}
......
......@@ -1054,13 +1054,16 @@ int
testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
const char *infile, const char *outfile, bool live,
testCompareDomXML2XMLPreFormatCallback cb,
const void *opaque)
const void *opaque, unsigned int parseFlags)
{
char *actual = NULL;
int ret = -1;
virDomainDefPtr def = NULL;
unsigned int parse_flags = live ? 0 : VIR_DOMAIN_DEF_PARSE_INACTIVE;
unsigned int format_flags = VIR_DOMAIN_DEF_FORMAT_SECURE;
parse_flags |= parseFlags;
if (!live)
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;
......
......@@ -142,6 +142,7 @@ int testCompareDomXML2XMLFiles(virCapsPtr caps,
const char *outfile,
bool live,
testCompareDomXML2XMLPreFormatCallback cb,
const void *opaque);
const void *opaque,
unsigned int parseFlags);
#endif /* __VIT_TEST_UTILS_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册