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

[libvirt] [PATCH v2 04/19] tests: Rename virtTestCompareToFile to virTestCompareToFile.



This function doesn't follow our convention of naming functions.
---
 tests/bhyvexml2argvtest.c        | 6 +++---
 tests/cputest.c                  | 2 +-
 tests/domaincapstest.c           | 2 +-
 tests/lxcconf2xmltest.c          | 2 +-
 tests/networkxml2conftest.c      | 2 +-
 tests/networkxml2firewalltest.c  | 2 +-
 tests/networkxml2xmltest.c       | 2 +-
 tests/networkxml2xmlupdatetest.c | 2 +-
 tests/nodeinfotest.c             | 4 ++--
 tests/nwfilterxml2firewalltest.c | 2 +-
 tests/nwfilterxml2xmltest.c      | 2 +-
 tests/qemuargv2xmltest.c         | 2 +-
 tests/qemucapabilitiestest.c     | 2 +-
 tests/qemucaps2xmltest.c         | 2 +-
 tests/qemumonitorjsontest.c      | 2 +-
 tests/qemuxml2argvtest.c         | 2 +-
 tests/secretxml2xmltest.c        | 2 +-
 tests/sexpr2xmltest.c            | 2 +-
 tests/storagepoolxml2xmltest.c   | 2 +-
 tests/storagevolxml2argvtest.c   | 2 +-
 tests/storagevolxml2xmltest.c    | 2 +-
 tests/sysinfotest.c              | 2 +-
 tests/testutils.c                | 6 +++---
 tests/testutils.h                | 4 ++--
 tests/vircaps2xmltest.c          | 2 +-
 tests/vircgrouptest.c            | 2 +-
 tests/virnetdaemontest.c         | 2 +-
 tests/vmx2xmltest.c              | 2 +-
 tests/xencapstest.c              | 2 +-
 tests/xlconfigtest.c             | 4 ++--
 tests/xmconfigtest.c             | 4 ++--
 tests/xml2sexprtest.c            | 2 +-
 tests/xml2vmxtest.c              | 2 +-
 33 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index 68d35db..7a2d366 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -66,14 +66,14 @@ static int testCompareXMLToArgvFiles(const char *xml,
     if (!(actualld = virCommandToString(ldcmd)))
         goto out;
 
-    if (virtTestCompareToFile(actualargv, cmdline) < 0)
+    if (virTestCompareToFile(actualargv, cmdline) < 0)
         goto out;
 
-    if (virtTestCompareToFile(actualld, ldcmdline) < 0)
+    if (virTestCompareToFile(actualld, ldcmdline) < 0)
         goto out;
 
     if (virFileExists(dmcmdline) || actualdm) {
-        if (virtTestCompareToFile(actualdm, dmcmdline) < 0)
+        if (virTestCompareToFile(actualdm, dmcmdline) < 0)
             goto out;
     }
 
diff --git a/tests/cputest.c b/tests/cputest.c
index 0890985..c0e26be 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -168,7 +168,7 @@ cpuTestCompareXML(const char *arch,
     if (!(actual = virCPUDefFormat(cpu, NULL, updateCPU)))
         goto cleanup;
 
-    if (virtTestCompareToFile(actual, xml) < 0)
+    if (virTestCompareToFile(actual, xml) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 3f5ed52..708208a 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -217,7 +217,7 @@ test_virDomainCapsFormat(const void *opaque)
     if (!(domCapsXML = virDomainCapsFormat(domCaps)))
         goto cleanup;
 
-    if (virtTestCompareToFile(domCapsXML, path) < 0)
+    if (virTestCompareToFile(domCapsXML, path) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/lxcconf2xmltest.c b/tests/lxcconf2xmltest.c
index da8239d..779b590 100644
--- a/tests/lxcconf2xmltest.c
+++ b/tests/lxcconf2xmltest.c
@@ -45,7 +45,7 @@ testCompareXMLToConfigFiles(const char *xmlfile,
         if (!(actualxml = virDomainDefFormat(vmdef, caps, 0)))
             goto fail;
 
-        if (virtTestCompareToFile(actualxml, xmlfile) < 0)
+        if (virTestCompareToFile(actualxml, xmlfile) < 0)
             goto fail;
     }
 
diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
index 9995636..11e08c0 100644
--- a/tests/networkxml2conftest.c
+++ b/tests/networkxml2conftest.c
@@ -45,7 +45,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf, dnsmasqCapsPtr
                         dctx, caps) < 0)
         goto fail;
 
-    if (virtTestCompareToFile(actual, outconf) < 0)
+    if (virTestCompareToFile(actual, outconf) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c
index d779d05..baf5904 100644
--- a/tests/networkxml2firewalltest.c
+++ b/tests/networkxml2firewalltest.c
@@ -68,7 +68,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     virtTestClearCommandPath(actualargv);
     virCommandSetDryRun(NULL, NULL, NULL);
 
-    if (virtTestCompareToFile(actualargv, cmdline) < 0)
+    if (virTestCompareToFile(actualargv, cmdline) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c
index 94b1c29..d65f6aa 100644
--- a/tests/networkxml2xmltest.c
+++ b/tests/networkxml2xmltest.c
@@ -47,7 +47,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
     if (expectResult == TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT)
         goto cleanup;
 
-    if (virtTestCompareToFile(actual, outxml) < 0) {
+    if (virTestCompareToFile(actual, outxml) < 0) {
         result = TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE;
         goto cleanup;
     }
diff --git a/tests/networkxml2xmlupdatetest.c b/tests/networkxml2xmlupdatetest.c
index f33ddaf..7b01abc 100644
--- a/tests/networkxml2xmlupdatetest.c
+++ b/tests/networkxml2xmlupdatetest.c
@@ -41,7 +41,7 @@ testCompareXMLToXMLFiles(const char *netxml, const char *updatexml,
         goto fail;
 
     if (!expectFailure) {
-        if (virtTestCompareToFile(actual, outxml) < 0)
+        if (virTestCompareToFile(actual, outxml) < 0)
             goto error;
     }
 
diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
index bfce0bd..9eab2f6 100644
--- a/tests/nodeinfotest.c
+++ b/tests/nodeinfotest.c
@@ -60,7 +60,7 @@ linuxTestCompareFiles(char *sysfs_prefix,
                     nodeinfo.cores, nodeinfo.threads) < 0)
         goto fail;
 
-    if (virtTestCompareToFile(actualData, outputfile) < 0)
+    if (virTestCompareToFile(actualData, outputfile) < 0)
         goto fail;
 
     ret = 0;
@@ -137,7 +137,7 @@ linuxCPUStatsCompareFiles(const char *cpustatfile,
         goto fail;
     }
 
-    if (virtTestCompareToFile(actualData, outfile) < 0)
+    if (virTestCompareToFile(actualData, outfile) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c
index f534019..205d3b6 100644
--- a/tests/nwfilterxml2firewalltest.c
+++ b/tests/nwfilterxml2firewalltest.c
@@ -405,7 +405,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
 
     testRemoveCommonRules(actualargv);
 
-    if (virtTestCompareToFile(actualargv, cmdline) < 0)
+    if (virTestCompareToFile(actualargv, cmdline) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c
index b26b9da..9beb8b6 100644
--- a/tests/nwfilterxml2xmltest.c
+++ b/tests/nwfilterxml2xmltest.c
@@ -40,7 +40,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml,
     if (!(actual = virNWFilterDefFormat(dev)))
         goto fail;
 
-    if (virtTestCompareToFile(actual, outxml) < 0)
+    if (virTestCompareToFile(actual, outxml) < 0)
         goto fail;
 
  done:
diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
index 45cc9c1..25f0a69 100644
--- a/tests/qemuargv2xmltest.c
+++ b/tests/qemuargv2xmltest.c
@@ -103,7 +103,7 @@ static int testCompareXMLToArgvFiles(const char *xmlfile,
     if (!(actualxml = virDomainDefFormat(vmdef, driver.caps, 0)))
         goto fail;
 
-    if (virtTestCompareToFile(actualxml, xmlfile) < 0)
+    if (virTestCompareToFile(actualxml, xmlfile) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index cbad284..2a94ec7 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -118,7 +118,7 @@ testQemuCaps(const void *opaque)
     if (!(actual = virQEMUCapsFormatCache(capsActual, 0, 0)))
         goto cleanup;
 
-    if (virtTestCompareToFile(actual, capsFile) < 0)
+    if (virTestCompareToFile(actual, capsFile) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c
index 5f634d1..1b1ff7c 100644
--- a/tests/qemucaps2xmltest.c
+++ b/tests/qemucaps2xmltest.c
@@ -145,7 +145,7 @@ testQemuCapsXML(const void *opaque)
     if (!capsXml)
         goto cleanup;
 
-    if (virtTestCompareToFile(capsXml, xmlFile) < 0)
+    if (virTestCompareToFile(capsXml, xmlFile) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index e929cb2..bb63386 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2189,7 +2189,7 @@ testQemuMonitorJSONGetCPUData(const void *opaque)
     if (!(actual = cpuDataFormat(cpuData)))
         goto cleanup;
 
-    if (virtTestCompareToFile(actual, dataFile) < 0)
+    if (virTestCompareToFile(actual, dataFile) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a2528fd..1056be0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -340,7 +340,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     if (!(actualargv = virCommandToString(cmd)))
         goto out;
 
-    if (virtTestCompareToFile(actualargv, cmdline) < 0)
+    if (virTestCompareToFile(actualargv, cmdline) < 0)
         goto out;
 
     ret = 0;
diff --git a/tests/secretxml2xmltest.c b/tests/secretxml2xmltest.c
index 14386a8..8dcbb40 100644
--- a/tests/secretxml2xmltest.c
+++ b/tests/secretxml2xmltest.c
@@ -21,7 +21,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml)
     if (!(actual = virSecretDefFormat(secret)))
         goto fail;
 
-    if (virtTestCompareToFile(actual, outxml) < 0)
+    if (virTestCompareToFile(actual, outxml) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c
index 19416fc..9982fad 100644
--- a/tests/sexpr2xmltest.c
+++ b/tests/sexpr2xmltest.c
@@ -65,7 +65,7 @@ testCompareFiles(const char *xml, const char *sexpr)
   if (!(gotxml = virDomainDefFormat(def, caps, 0)))
       goto fail;
 
-  if (virtTestCompareToFile(gotxml, xml) < 0)
+  if (virTestCompareToFile(gotxml, xml) < 0)
       goto fail;
 
   ret = 0;
diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c
index 05bc87c..2e1e811 100644
--- a/tests/storagepoolxml2xmltest.c
+++ b/tests/storagepoolxml2xmltest.c
@@ -29,7 +29,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml)
     if (!(actual = virStoragePoolDefFormat(dev)))
         goto fail;
 
-    if (virtTestCompareToFile(actual, outxml) < 0)
+    if (virTestCompareToFile(actual, outxml) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c
index b2c4f3c..8934471 100644
--- a/tests/storagevolxml2argvtest.c
+++ b/tests/storagevolxml2argvtest.c
@@ -95,7 +95,7 @@ testCompareXMLToArgvFiles(bool shouldFail,
     if (!(actualCmdline = virCommandToString(cmd)))
         goto cleanup;
 
-    if (virtTestCompareToFile(actualCmdline, cmdline) < 0)
+    if (virTestCompareToFile(actualCmdline, cmdline) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c
index 5076d1f..f722452 100644
--- a/tests/storagevolxml2xmltest.c
+++ b/tests/storagevolxml2xmltest.c
@@ -34,7 +34,7 @@ testCompareXMLToXMLFiles(const char *poolxml, const char *inxml,
     if (!(actual = virStorageVolDefFormat(pool, dev)))
         goto fail;
 
-    if (virtTestCompareToFile(actual, outxml) < 0)
+    if (virTestCompareToFile(actual, outxml) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c
index 596f61f..457c341 100644
--- a/tests/sysinfotest.c
+++ b/tests/sysinfotest.c
@@ -79,7 +79,7 @@ testSysinfo(const void *data)
     if (!(sysfsActualData = virBufferCurrentContent(&buf)))
         goto cleanup;
 
-    if (virtTestCompareToFile(sysfsActualData, testdata->expected) < 0)
+    if (virTestCompareToFile(sysfsActualData, testdata->expected) < 0)
         goto cleanup;
 
     result = 0;
diff --git a/tests/testutils.c b/tests/testutils.c
index 0341311..256ebde 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -686,8 +686,8 @@ int virtTestDifferenceBin(FILE *stream,
  * @param filename: File to compare strcontent against
  */
 int
-virtTestCompareToFile(const char *strcontent,
-                      const char *filename)
+virTestCompareToFile(const char *strcontent,
+                     const char *filename)
 {
     int ret = -1;
     char *filecontent = NULL;
@@ -1138,7 +1138,7 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
         goto out;
     }
 
-    if (virtTestCompareToFile(actual, outfile) < 0) {
+    if (virTestCompareToFile(actual, outfile) < 0) {
         result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_COMPARE;
         goto out;
     }
diff --git a/tests/testutils.h b/tests/testutils.h
index c32af2c..350401b 100644
--- a/tests/testutils.h
+++ b/tests/testutils.h
@@ -73,8 +73,8 @@ int virtTestDifferenceBin(FILE *stream,
                           const char *expect,
                           const char *actual,
                           size_t length);
-int virtTestCompareToFile(const char *strcontent,
-                          const char *filename);
+int virTestCompareToFile(const char *strcontent,
+                         const char *filename);
 
 unsigned int virTestGetDebug(void);
 unsigned int virTestGetVerbose(void);
diff --git a/tests/vircaps2xmltest.c b/tests/vircaps2xmltest.c
index 58fa995..3e9e06b 100644
--- a/tests/vircaps2xmltest.c
+++ b/tests/vircaps2xmltest.c
@@ -120,7 +120,7 @@ test_virCapabilitiesFormat(const void *opaque)
                     abs_srcdir, data->filename) < 0)
         goto cleanup;
 
-    if (virtTestCompareToFile(capsXML, path) < 0)
+    if (virTestCompareToFile(capsXML, path) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
index 03ed087..9578e3a 100644
--- a/tests/vircgrouptest.c
+++ b/tests/vircgrouptest.c
@@ -190,7 +190,7 @@ testCgroupDetectMounts(const void *args)
         goto cleanup;
 
     actual = virBufferCurrentContent(&buf);
-    if (virtTestCompareToFile(actual, parsed) < 0)
+    if (virTestCompareToFile(actual, parsed) < 0)
         goto cleanup;
 
     result = 0;
diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c
index 4537d11..91030f4 100644
--- a/tests/virnetdaemontest.c
+++ b/tests/virnetdaemontest.c
@@ -258,7 +258,7 @@ static int testExecRestart(const void *opaque)
     if (!(outjsonstr = virJSONValueToString(outjson, true)))
         goto cleanup;
 
-    if (virtTestCompareToFile(outjsonstr, outfile) < 0)
+    if (virTestCompareToFile(outjsonstr, outfile) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 549d365..9b59fd5 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -90,7 +90,7 @@ testCompareFiles(const char *vmx, const char *xml)
                                          VIR_DOMAIN_DEF_FORMAT_SECURE)))
         goto cleanup;
 
-    if (virtTestCompareToFile(formatted, xml) < 0)
+    if (virTestCompareToFile(formatted, xml) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/tests/xencapstest.c b/tests/xencapstest.c
index d58822c..0e83d8a 100644
--- a/tests/xencapstest.c
+++ b/tests/xencapstest.c
@@ -45,7 +45,7 @@ testCompareFiles(virArch hostmachine, const char *xml_rel,
   if (!(actualxml = virCapabilitiesFormatXML(caps)))
       goto fail;
 
-  if (virtTestCompareToFile(actualxml, xml) < 0)
+  if (virTestCompareToFile(actualxml, xml) < 0)
       goto fail;
 
   ret = 0;
diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c
index 0e2db09..62bb144 100644
--- a/tests/xlconfigtest.c
+++ b/tests/xlconfigtest.c
@@ -79,7 +79,7 @@ testCompareParseXML(const char *xlcfg, const char *xml)
         goto fail;
     gotxlcfgData[wrote] = '\0';
 
-    if (virtTestCompareToFile(gotxlcfgData, xlcfg) < 0)
+    if (virTestCompareToFile(gotxlcfgData, xlcfg) < 0)
         goto fail;
 
     ret = 0;
@@ -124,7 +124,7 @@ testCompareFormatXML(const char *xlcfg, const char *xml)
                                       VIR_DOMAIN_XML_SECURE)))
         goto fail;
 
-    if (virtTestCompareToFile(gotxml, xml) < 0)
+    if (virTestCompareToFile(gotxml, xml) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c
index d767cc4..0eebda7 100644
--- a/tests/xmconfigtest.c
+++ b/tests/xmconfigtest.c
@@ -79,7 +79,7 @@ testCompareParseXML(const char *xmcfg, const char *xml)
         goto fail;
     gotxmcfgData[wrote] = '\0';
 
-    if (virtTestCompareToFile(gotxmcfgData, xmcfg) < 0)
+    if (virTestCompareToFile(gotxmcfgData, xmcfg) < 0)
         goto fail;
 
     ret = 0;
@@ -124,7 +124,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml)
     if (!(gotxml = virDomainDefFormat(def, caps, VIR_DOMAIN_DEF_FORMAT_SECURE)))
         goto fail;
 
-    if (virtTestCompareToFile(gotxml, xml) < 0)
+    if (virTestCompareToFile(gotxml, xml) < 0)
         goto fail;
 
     ret = 0;
diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c
index cc16b18..77fea4a 100644
--- a/tests/xml2sexprtest.c
+++ b/tests/xml2sexprtest.c
@@ -39,7 +39,7 @@ testCompareFiles(const char *xml, const char *sexpr)
   if (!(gotsexpr = xenFormatSxpr(NULL, def)))
       goto fail;
 
-  if (virtTestCompareToFile(gotsexpr, sexpr) < 0)
+  if (virTestCompareToFile(gotsexpr, sexpr) < 0)
       goto fail;
 
   ret = 0;
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 517dc0e..bf66152 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -91,7 +91,7 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
     if (formatted == NULL)
         goto failure;
 
-    if (virtTestCompareToFile(formatted, vmx) < 0)
+    if (virTestCompareToFile(formatted, vmx) < 0)
         goto failure;
 
     result = 0;
-- 
2.5.5


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