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,
|
ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
|
||||||
info->different ? xml_out : xml_in,
|
info->different ? xml_out : xml_in,
|
||||||
!info->inactive_only, NULL, NULL, 0,
|
!info->inactive_only, 0,
|
||||||
info->expectResult);
|
info->expectResult);
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml_in);
|
VIR_FREE(xml_in);
|
||||||
|
@ -46,7 +46,7 @@ testCompareXMLToXMLHelper(const void *data)
|
|||||||
ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
|
ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
|
||||||
info->different ? xml_out : xml_in,
|
info->different ? xml_out : xml_in,
|
||||||
!info->inactive_only,
|
!info->inactive_only,
|
||||||
NULL, NULL, info->parse_flags,
|
info->parse_flags,
|
||||||
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml_in);
|
VIR_FREE(xml_in);
|
||||||
|
@ -47,8 +47,7 @@ testXML2XMLActive(const void *opaque)
|
|||||||
|
|
||||||
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
||||||
info->inName, info->outActiveName, true,
|
info->inName, info->outActiveName, true,
|
||||||
NULL,
|
0,
|
||||||
opaque, 0,
|
|
||||||
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ testXML2XMLInactive(const void *opaque)
|
|||||||
|
|
||||||
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName,
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName,
|
||||||
info->outInactiveName, false,
|
info->outInactiveName, false,
|
||||||
NULL, opaque, 0,
|
0,
|
||||||
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1241,8 +1241,7 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
|
|||||||
int
|
int
|
||||||
testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
|
testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
|
||||||
const char *infile, const char *outfile, bool live,
|
const char *infile, const char *outfile, bool live,
|
||||||
testCompareDomXML2XMLPreFormatCallback cb,
|
unsigned int parseFlags,
|
||||||
const void *opaque, unsigned int parseFlags,
|
|
||||||
testCompareDomXML2XMLResult expectResult)
|
testCompareDomXML2XMLResult expectResult)
|
||||||
{
|
{
|
||||||
char *actual = NULL;
|
char *actual = NULL;
|
||||||
@ -1273,11 +1272,6 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
|
|||||||
goto out;
|
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))) {
|
if (!(actual = virDomainDefFormat(def, caps, format_flags))) {
|
||||||
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_FORMAT;
|
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_FORMAT;
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -153,20 +153,15 @@ typedef enum {
|
|||||||
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS,
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS,
|
||||||
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE,
|
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE,
|
||||||
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_STABILITY,
|
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_FORMAT,
|
||||||
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_COMPARE,
|
TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_COMPARE,
|
||||||
} testCompareDomXML2XMLResult;
|
} testCompareDomXML2XMLResult;
|
||||||
|
|
||||||
typedef int (*testCompareDomXML2XMLPreFormatCallback)(virDomainDefPtr def,
|
|
||||||
const void *opaque);
|
|
||||||
int testCompareDomXML2XMLFiles(virCapsPtr caps,
|
int testCompareDomXML2XMLFiles(virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
const char *inxml,
|
const char *inxml,
|
||||||
const char *outfile,
|
const char *outfile,
|
||||||
bool live,
|
bool live,
|
||||||
testCompareDomXML2XMLPreFormatCallback cb,
|
|
||||||
const void *opaque,
|
|
||||||
unsigned int parseFlags,
|
unsigned int parseFlags,
|
||||||
testCompareDomXML2XMLResult expectResult);
|
testCompareDomXML2XMLResult expectResult);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user