{
const struct testQemuInfo *info = opaque;
- if (testXML2XMLCommon(info) < 0)
+ if (testXML2XMLCommon(info) < 0 ||
+ testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
+ info->infile, info->outfile, true,
+ info->parseFlags,
+ TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS) < 0) {
+ *info->conf->retptr = -1;
return -1;
+ }
- return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
- info->infile, info->outfile, true,
- info->parseFlags,
- TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
+ return 0;
}
{
const struct testQemuInfo *info = opaque;
- if (testXML2XMLCommon(info) < 0)
+ if (testXML2XMLCommon(info) < 0 ||
+ testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
+ info->infile, info->outfile, false,
+ info->parseFlags,
+ TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS) < 0) {
+ *info->conf->retptr = -1;
return -1;
+ }
- return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
- info->infile, info->outfile, false,
- info->parseFlags,
- TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
+ return 0;
}
struct testQemuConf testConf = { .capslatest = capslatest,
.capscache = capscache,
.qapiSchemaCache = NULL,
- .retptr = NULL };
+ .retptr = &ret };
if (!capslatest)
return EXIT_FAILURE;
\
if (when & WHEN_INACTIVE) { \
testInfoSetPaths(&info, suffix, WHEN_INACTIVE); \
- if (virTestRun("QEMU XML-2-XML-inactive " _name, \
- testXML2XMLInactive, &info) < 0) \
- ret = -1; \
+ virTestRun("QEMU XML-2-XML-inactive " _name, testXML2XMLInactive, &info); \
} \
\
if (when & WHEN_ACTIVE) { \
testInfoSetPaths(&info, suffix, WHEN_ACTIVE); \
- if (virTestRun("QEMU XML-2-XML-active " _name, \
- testXML2XMLActive, &info) < 0) \
- ret = -1; \
+ virTestRun("QEMU XML-2-XML-active " _name, testXML2XMLActive, &info); \
} \
testQemuInfoClear(&info); \
} while (0)