diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index 2d34a00fec..8f556eeee6 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -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); diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index aa3a570854..bf9b11d3de 100644 --- a/tests/genericxml2xmltest.c +++ b/tests/genericxml2xmltest.c @@ -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); diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c index aafebb4da8..8174a544d8 100644 --- a/tests/lxcxml2xmltest.c +++ b/tests/lxcxml2xmltest.c @@ -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); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ef6e35a9cd..80c80f663e 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -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); } diff --git a/tests/testutils.c b/tests/testutils.c index c1ca6568fa..b1bd4e8877 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -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; diff --git a/tests/testutils.h b/tests/testutils.h index bb58148453..752fa52514 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -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__ */