mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
testCompareDomXML2XMLFiles: add parseFlags parameter
Allow testing XML parsing with different flags.
This commit is contained in:
parent
e4f1be7eb6
commit
1d6dcec080
@ -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__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user