]> xenbits.xensource.com Git - libvirt.git/commitdiff
Rename virtTestLoadFile to virTestLoadFile.
authorTomáš Ryšavý <tom.rysavy.0@gmail.com>
Thu, 26 May 2016 15:01:52 +0000 (17:01 +0200)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 8 Jun 2016 15:23:12 +0000 (11:23 -0400)
This function doesn't follow our convention of naming functions.

21 files changed:
tests/domainsnapshotxml2xmltest.c
tests/interfacexml2xmltest.c
tests/lxcconf2xmltest.c
tests/networkxml2xmlupdatetest.c
tests/nodedevxml2xmltest.c
tests/qemuargv2xmltest.c
tests/qemucapabilitiestest.c
tests/qemucaps2xmltest.c
tests/qemuhelptest.c
tests/qemuhotplugtest.c
tests/qemumonitorjsontest.c
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c
tests/sexpr2xmltest.c
tests/testutils.c
tests/testutils.h
tests/vboxsnapshotxmltest.c
tests/vmwarevertest.c
tests/vmx2xmltest.c
tests/xlconfigtest.c
tests/xmconfigtest.c

index 77f9d7ee13657125cab9b172775e6c2be912508d..8195e22e307a2efff368604f41e9da7fc397dea5 100644 (file)
@@ -89,10 +89,10 @@ testCompareXMLToXMLFiles(const char *inxml,
     if (redefine)
         flags |= VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE;
 
-    if (virtTestLoadFile(inxml, &inXmlData) < 0)
+    if (virTestLoadFile(inxml, &inXmlData) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(outxml, &outXmlData) < 0)
+    if (virTestLoadFile(outxml, &outXmlData) < 0)
         goto cleanup;
 
     if (!(def = virDomainSnapshotDefParseString(inXmlData, driver.caps,
index b31e500879657a86d18026075f0752700134d93f..a2ebf16b0afe3468c7be023aff2855d27b1a822b 100644 (file)
@@ -24,7 +24,7 @@ testCompareXMLToXMLFiles(const char *xml)
     int ret = -1;
     virInterfaceDefPtr dev = NULL;
 
-    if (virtTestLoadFile(xml, &xmlData) < 0)
+    if (virTestLoadFile(xml, &xmlData) < 0)
         goto fail;
 
     if (!(dev = virInterfaceDefParseString(xmlData)))
index 0d6762f1771dd26bbb377c1fd3f34f22e94b2a20..da8239d9b0b217177733b5ecc93dbc867b007f78 100644 (file)
@@ -31,7 +31,7 @@ testCompareXMLToConfigFiles(const char *xmlfile,
     char *actualxml = NULL;
     virDomainDefPtr vmdef = NULL;
 
-    if (virtTestLoadFile(configfile, &config) < 0)
+    if (virTestLoadFile(configfile, &config) < 0)
         goto fail;
 
     vmdef = lxcParseConfigString(config, caps, xmlopt);
index 3e8b33f12cb2cf8812ce07fe4c377b3e4eaab59d..f33ddaf7fef70cc0eaac9cbb20b16a78650a1797 100644 (file)
@@ -27,7 +27,7 @@ testCompareXMLToXMLFiles(const char *netxml, const char *updatexml,
     int ret = -1;
     virNetworkDefPtr def = NULL;
 
-    if (virtTestLoadFile(updatexml, &updateXmlData) < 0)
+    if (virTestLoadFile(updatexml, &updateXmlData) < 0)
         goto error;
 
     if (!(def = virNetworkDefParseFile(netxml)))
index 13410b52a5da5fff5358fad1c1bf8030d26708cb..cd8bf8a93ef984c82bfb5d5de90e59c907464812 100644 (file)
@@ -24,7 +24,7 @@ testCompareXMLToXMLFiles(const char *xml)
     int ret = -1;
     virNodeDeviceDefPtr dev = NULL;
 
-    if (virtTestLoadFile(xml, &xmlData) < 0)
+    if (virTestLoadFile(xml, &xmlData) < 0)
         goto fail;
 
     if (!(dev = virNodeDeviceDefParseString(xmlData, EXISTING_DEVICE, NULL)))
index 147038fa1c565afe05f4d1ffb45f8e6a3f1892d7..45cc9c1d4e8a6643d7f1402018dbf60c1bbb79b3 100644 (file)
@@ -62,7 +62,7 @@ static int testCompareXMLToArgvFiles(const char *xmlfile,
     int ret = -1;
     virDomainDefPtr vmdef = NULL;
 
-    if (virtTestLoadFile(cmdfile, &cmd) < 0)
+    if (virTestLoadFile(cmdfile, &cmd) < 0)
         goto fail;
 
     if (!(vmdef = qemuParseCommandLineString(driver.caps, driver.xmlopt,
index 7eedc0523f648a36593a189253cd78cf6fc2a521..9637763fb3df5191c6f6b680d047e23ab140a839 100644 (file)
@@ -104,7 +104,7 @@ testQemuCaps(const void *opaque)
                     abs_srcdir, data->base, data->archName) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(repliesFile, &replies) < 0)
+    if (virTestLoadFile(repliesFile, &replies) < 0)
         goto cleanup;
 
     if (!(mon = testQemuFeedMonitor(replies, data->xmlopt)))
index 39d79a145293e2b92bf69f103dfcc9c3ee9aa949..5f634d11839d457905ad6ecc69e832f85704b264 100644 (file)
@@ -135,7 +135,7 @@ testQemuCapsXML(const void *opaque)
                     abs_srcdir, data->base) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(capsFile, &capsData) < 0)
+    if (virTestLoadFile(capsFile, &capsData) < 0)
         goto cleanup;
 
     if (!(capsProvided = testGetCaps(capsData, data)))
index 8bc74f780d0763e3729f07d4b53130a672b33359..d32a731e0f4e96b39d1d0899a993e74dd6cf3337 100644 (file)
@@ -52,7 +52,7 @@ static int testHelpStrParsing(const void *data)
     if (virAsprintf(&path, "%s/qemuhelpdata/%s", abs_srcdir, info->name) < 0)
         return -1;
 
-    if (virtTestLoadFile(path, &help) < 0)
+    if (virTestLoadFile(path, &help) < 0)
         goto cleanup;
 
     if (!(flags = virQEMUCapsNew()))
@@ -76,7 +76,7 @@ static int testHelpStrParsing(const void *data)
                     info->name) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(path, &help) < 0)
+    if (virTestLoadFile(path, &help) < 0)
         goto cleanup;
 
     if (virQEMUCapsParseDeviceStr(flags, help) < 0)
index 39613281a330dc58db3612a6d3bb3867307b7337..68279d0c2ab273d9d5307c2f686631fbbb474fe8 100644 (file)
@@ -233,12 +233,12 @@ testQemuHotplug(const void *data)
                     test->device_filename) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(domain_filename, &domain_xml) < 0 ||
-        virtTestLoadFile(device_filename, &device_xml) < 0)
+    if (virTestLoadFile(domain_filename, &domain_xml) < 0 ||
+        virTestLoadFile(device_filename, &device_xml) < 0)
         goto cleanup;
 
     if (test->action != UPDATE &&
-        virtTestLoadFile(result_filename, &result_xml) < 0)
+        virTestLoadFile(result_filename, &result_xml) < 0)
         goto cleanup;
 
     if (!(caps = virQEMUDriverGetCapabilities(&driver, false)))
index 3554f4288ada6a731a50464e7e8f2ea0f571a1d0..9dc2698a9bf073c36b506130bcd5e33f8213e9c0 100644 (file)
@@ -2159,7 +2159,7 @@ testQemuMonitorJSONGetCPUData(const void *opaque)
                     abs_srcdir, data->name) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(jsonFile, &jsonStr) < 0)
+    if (virTestLoadFile(jsonFile, &jsonStr) < 0)
         goto cleanup;
 
     if (qemuMonitorTestAddItem(test, "qom-list",
index 0009276007190be06475bd1d946205cebdefccbc..3e83e9912f5f07f3a4f0f5247928195ca96a2953 100644 (file)
@@ -194,7 +194,7 @@ fakeStoragePoolGetXMLDesc(virStoragePoolPtr pool,
                     pool->name) < 0)
         return NULL;
 
-    if (virtTestLoadFile(xmlpath, &xmlbuf) < 0) {
+    if (virTestLoadFile(xmlpath, &xmlbuf) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        "failed to load XML file '%s'",
                        xmlpath);
index dfcfa1477f365d0c2fb58996139bccc44643a823..b22b377de0e0bc9f4a2d1940988158bf2d21adec 100644 (file)
@@ -109,9 +109,9 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
     int ret = -1;
     int keepBlanksDefault = xmlKeepBlanksDefault(0);
 
-    if (virtTestLoadFile(data->inName, &inFile) < 0)
+    if (virTestLoadFile(data->inName, &inFile) < 0)
         goto cleanup;
-    if (virtTestLoadFile(data->outActiveName, &outActiveFile) < 0)
+    if (virTestLoadFile(data->outActiveName, &outActiveFile) < 0)
         goto cleanup;
 
     /* construct faked source status XML */
index 0fe0ba227966db2b81cb44e85fd6ba39b2f3d0b6..19416fcfa9d1bb34880c1b87146f440cabd95fc5 100644 (file)
@@ -36,7 +36,7 @@ testCompareFiles(const char *xml, const char *sexpr)
   conn = virGetConnect();
   if (!conn) goto fail;
 
-  if (virtTestLoadFile(sexpr, &sexprData) < 0)
+  if (virTestLoadFile(sexpr, &sexprData) < 0)
       goto fail;
 
   memset(&priv, 0, sizeof(priv));
index 78c9e30deb6fdfb27fc701da2952ed0acb64635c..2749cdfed0335b0151f8a6c002a0c6003e6a1cd4 100644 (file)
@@ -294,7 +294,7 @@ virTestRun(const char *title,
    Upon any failure, diagnose it and return -1, but don't bother trying
    to preserve errno. Otherwise, return the number of bytes copied into BUF. */
 int
-virtTestLoadFile(const char *file, char **buf)
+virTestLoadFile(const char *file, char **buf)
 {
     FILE *fp = fopen(file, "r");
     struct stat st;
@@ -693,7 +693,7 @@ virtTestCompareToFile(const char *strcontent,
     char *filecontent = NULL;
     char *fixedcontent = NULL;
 
-    if (virtTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate())
+    if (virTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate())
         goto failure;
 
     if (filecontent &&
index 6a8eeb96f7f50b77d5c2d2a9252ebc31661a36d0..c32af2c0e9dad8fe8400fea02ffd9f07f6b9168a 100644 (file)
@@ -51,7 +51,7 @@ bool virtTestOOMActive(void);
 int virTestRun(const char *title,
                int (*body)(const void *data),
                const void *data);
-int virtTestLoadFile(const char *file, char **buf);
+int virTestLoadFile(const char *file, char **buf);
 int virtTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen);
 
 void virtTestClearCommandPath(char *cmdset);
index 5e040bdf3b07097db9052ed2206058225a5336d4..fa7bbfe4a30d790a539745743ce7ad8d22e5e95d 100644 (file)
@@ -67,7 +67,7 @@ testCompareXMLtoXMLFiles(const char *xml)
     if (virFileMakePath(abs_builddir "/vboxsnapshotxmldata") < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(xml, &xmlData) < 0)
+    if (virTestLoadFile(xml, &xmlData) < 0)
         goto cleanup;
 
     if (!(machine = virVBoxSnapshotConfLoadVboxFile(xml, (char*)"")))
@@ -76,7 +76,7 @@ testCompareXMLtoXMLFiles(const char *xml)
     if (virVBoxSnapshotConfSaveVboxFile(machine, pathResult) < 0)
         goto cleanup;
 
-    if (virtTestLoadFile(pathResult, &actual) < 0)
+    if (virTestLoadFile(pathResult, &actual) < 0)
         goto cleanup;
 
     if (!(actual = testFilterXML(actual)))
index 37d88ffd88ba42bd0bc6503946bd5a12b2d4c240..9c17cc6500b3237bd159f5179b33617a4bb465c6 100644 (file)
@@ -49,7 +49,7 @@ testVerStrParse(const void *data)
                     info->name) < 0)
         return -1;
 
-    if (virtTestLoadFile(path, &databuf) < 0)
+    if (virTestLoadFile(path, &databuf) < 0)
         goto cleanup;
 
     if ((vmware_type = vmwareDriverTypeFromString(info->vmware_type)) < 0)
index 435d45fd14a53ab66de36ed59a95bf5c95a440aa..549d365567e00627eed8062bfc7550b5e6dea021 100644 (file)
@@ -75,7 +75,7 @@ testCompareFiles(const char *vmx, const char *xml)
     char *formatted = NULL;
     virDomainDefPtr def = NULL;
 
-    if (virtTestLoadFile(vmx, &vmxData) < 0)
+    if (virTestLoadFile(vmx, &vmxData) < 0)
         goto cleanup;
 
     if (!(def = virVMXParseConfig(&ctx, xmlopt, caps, vmxData)))
index f17ab84a90cf8f78d58b2c7d10254f6bf5adc60c..0e2db0926d27965aff213644e7c6ffa8c6dbc9c1 100644 (file)
@@ -111,7 +111,7 @@ testCompareFormatXML(const char *xlcfg, const char *xml)
     conn = virGetConnect();
     if (!conn) goto fail;
 
-    if (virtTestLoadFile(xlcfg, &xlcfgData) < 0)
+    if (virTestLoadFile(xlcfg, &xlcfgData) < 0)
         goto fail;
 
     if (!(conf = virConfReadMem(xlcfgData, strlen(xlcfgData), 0)))
index 59c9d562b5ac6b3348f6a29504fd7fac5689ae95..ff283e7353d5d4ab693fb7b5dc0a570d1475414a 100644 (file)
@@ -108,7 +108,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml)
     conn = virGetConnect();
     if (!conn) goto fail;
 
-    if (virtTestLoadFile(xmcfg, &xmcfgData) < 0)
+    if (virTestLoadFile(xmcfg, &xmcfgData) < 0)
         goto fail;
 
     /* Many puppies died to bring you this code. */