]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: util: Remove callback from testCompareDomXML2XMLFiles
authorPeter Krempa <pkrempa@redhat.com>
Fri, 2 Mar 2018 15:58:50 +0000 (16:58 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 13 Mar 2018 12:54:11 +0000 (13:54 +0100)
The testCompareDomXML2XMLPreFormatCallback is no longer used and thus
can be removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
tests/genericxml2xmltest.c
tests/lxcxml2xmltest.c
tests/qemuxml2xmltest.c
tests/testutils.c
tests/testutils.h

index c33fce1922370484ee43bdacd3451d53ca2ead72..d8270a6cae82c93c2dc51060494168f015ca487c 100644 (file)
@@ -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);
index 57751a5773fe34e15e8074e3a8ef3ffee60d4db9..3b96862c62c7d781fd8aa0781071b418e16e0624 100644 (file)
@@ -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);
index 98afe1e4fde2eeaf0cb2716ab13e7d6c84330fcd..fa13479cbebf7884e376d40121d1274de816d2a2 100644 (file)
@@ -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);
 }
 
index 17959aaf4ff4689a97ddb9c06271d915555f76de..040ef1d2f7dec550901709fb4074255ebd5fcea0 100644 (file)
@@ -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;
index 668a79d95ce3fe14a22fde45029289a4ac27fc52..d840875bc159ee5726027262696254a3e3dc3861 100644 (file)
@@ -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);