[PATCH 5/7] tests: util: Remove callback from testCompareDomXML2XMLFiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The testCompareDomXML2XMLPreFormatCallback is no longer used and thus
can be removed.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/genericxml2xmltest.c | 2 +-
 tests/lxcxml2xmltest.c     | 2 +-
 tests/qemuxml2xmltest.c    | 5 ++---
 tests/testutils.c          | 8 +-------
 tests/testutils.h          | 5 -----
 5 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c
index c33fce1922..d8270a6cae 100644
--- a/tests/genericxml2xmltest.c
+++ b/tests/genericxml2xmltest.c
@@ -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);
diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c
index 57751a5773..3b96862c62 100644
--- a/tests/lxcxml2xmltest.c
+++ b/tests/lxcxml2xmltest.c
@@ -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);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 980d7fb0b3..ce4dae49c3 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -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);
 }

diff --git a/tests/testutils.c b/tests/testutils.c
index 17959aaf4f..040ef1d2f7 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -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;
diff --git a/tests/testutils.h b/tests/testutils.h
index 668a79d95c..d840875bc1 100644
--- a/tests/testutils.h
+++ b/tests/testutils.h
@@ -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);

-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux