tests: Rename virtTestCompareToFile to virTestCompareToFile.

This function doesn't follow our convention of naming functions.
This commit is contained in:
Tomáš Ryšavý 2016-05-26 17:01:53 +02:00 committed by John Ferlan
parent 401bb813bd
commit 239caffb1d
33 changed files with 41 additions and 41 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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:

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;