mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
tests: util: Remove callback from testCompareDomXML2XMLFiles
The testCompareDomXML2XMLPreFormatCallback is no longer used and thus can be removed. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
d1a7fc8bb3
commit
1b28038300
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user