static int testXML2XMLInactive(const void *opaque) { const struct testInfo *info = opaque; return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName, info->outInactiveName, false); }
static int testXML2XMLActive(const void *opaque) { const struct testInfo *info = opaque; return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName, info->outActiveName, true, qemuXML2XMLPreFormatCallback, opaque, 0); }
static int testCompareXMLToXMLHelper(const void *data) { const struct testInfo *info = data; char *xml_in = NULL; char *xml_out = NULL; int ret = -1; if (virAsprintf(&xml_in, "%s/lxcxml2xmldata/lxc-%s.xml", abs_srcdir, info->name) < 0 || virAsprintf(&xml_out, "%s/lxcxml2xmloutdata/lxc-%s.xml", abs_srcdir, info->name) < 0) goto cleanup; ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in, info->different ? xml_out : xml_in, !info->inactive_only, NULL, NULL, info->parse_flags); cleanup: VIR_FREE(xml_in); VIR_FREE(xml_out); return ret; }
static int testCompareXMLToXMLHelper(const void *data) { const struct testInfo *info = data; char *xml_in = NULL; char *xml_out = NULL; int ret = -1; if (virAsprintf(&xml_in, "%s/bhyvexml2argvdata/bhyvexml2argv-%s.xml", abs_srcdir, info->name) < 0 || virAsprintf(&xml_out, "%s/bhyvexml2xmloutdata/bhyvexml2xmlout-%s.xml", abs_srcdir, info->name) < 0) goto cleanup; ret = testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, xml_in, info->different ? xml_out : xml_in, false, NULL, NULL, 0, TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS); cleanup: VIR_FREE(xml_in); VIR_FREE(xml_out); return ret; }