提交 1b280383 编写于 作者: P Peter Krempa

tests: util: Remove callback from testCompareDomXML2XMLFiles

The testCompareDomXML2XMLPreFormatCallback is no longer used and thus
can be removed.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 d1a7fc8b
......@@ -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, 0,
!info->inactive_only, 0,
info->expectResult);
cleanup:
VIR_FREE(xml_in);
......
......@@ -46,7 +46,7 @@ testCompareXMLToXMLHelper(const void *data)
ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
info->different ? xml_out : xml_in,
!info->inactive_only,
NULL, NULL, info->parse_flags,
info->parse_flags,
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
cleanup:
VIR_FREE(xml_in);
......
......@@ -47,8 +47,7 @@ testXML2XMLActive(const void *opaque)
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
info->inName, info->outActiveName, true,
NULL,
opaque, 0,
0,
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
}
......@@ -60,7 +59,7 @@ testXML2XMLInactive(const void *opaque)
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName,
info->outInactiveName, false,
NULL, opaque, 0,
0,
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
}
......
......@@ -1241,8 +1241,7 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
int
testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
const char *infile, const char *outfile, bool live,
testCompareDomXML2XMLPreFormatCallback cb,
const void *opaque, unsigned int parseFlags,
unsigned int parseFlags,
testCompareDomXML2XMLResult expectResult)
{
char *actual = NULL;
......@@ -1273,11 +1272,6 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
goto out;
}
if (cb && cb(def, opaque) < 0) {
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_CB;
goto out;
}
if (!(actual = virDomainDefFormat(def, caps, format_flags))) {
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_FORMAT;
goto out;
......
......@@ -153,20 +153,15 @@ typedef enum {
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS,
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE,
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_STABILITY,
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_CB,
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_FORMAT,
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_COMPARE,
} testCompareDomXML2XMLResult;
typedef int (*testCompareDomXML2XMLPreFormatCallback)(virDomainDefPtr def,
const void *opaque);
int testCompareDomXML2XMLFiles(virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
const char *inxml,
const char *outfile,
bool live,
testCompareDomXML2XMLPreFormatCallback cb,
const void *opaque,
unsigned int parseFlags,
testCompareDomXML2XMLResult expectResult);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册