This function doesn't follow our convention of naming functions.
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,
int ret = -1;
virInterfaceDefPtr dev = NULL;
- if (virtTestLoadFile(xml, &xmlData) < 0)
+ if (virTestLoadFile(xml, &xmlData) < 0)
goto fail;
if (!(dev = virInterfaceDefParseString(xmlData)))
char *actualxml = NULL;
virDomainDefPtr vmdef = NULL;
- if (virtTestLoadFile(configfile, &config) < 0)
+ if (virTestLoadFile(configfile, &config) < 0)
goto fail;
vmdef = lxcParseConfigString(config, caps, xmlopt);
int ret = -1;
virNetworkDefPtr def = NULL;
- if (virtTestLoadFile(updatexml, &updateXmlData) < 0)
+ if (virTestLoadFile(updatexml, &updateXmlData) < 0)
goto error;
if (!(def = virNetworkDefParseFile(netxml)))
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)))
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,
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)))
abs_srcdir, data->base) < 0)
goto cleanup;
- if (virtTestLoadFile(capsFile, &capsData) < 0)
+ if (virTestLoadFile(capsFile, &capsData) < 0)
goto cleanup;
if (!(capsProvided = testGetCaps(capsData, 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()))
info->name) < 0)
goto cleanup;
- if (virtTestLoadFile(path, &help) < 0)
+ if (virTestLoadFile(path, &help) < 0)
goto cleanup;
if (virQEMUCapsParseDeviceStr(flags, help) < 0)
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)))
abs_srcdir, data->name) < 0)
goto cleanup;
- if (virtTestLoadFile(jsonFile, &jsonStr) < 0)
+ if (virTestLoadFile(jsonFile, &jsonStr) < 0)
goto cleanup;
if (qemuMonitorTestAddItem(test, "qom-list",
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);
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 */
conn = virGetConnect();
if (!conn) goto fail;
- if (virtTestLoadFile(sexpr, &sexprData) < 0)
+ if (virTestLoadFile(sexpr, &sexprData) < 0)
goto fail;
memset(&priv, 0, sizeof(priv));
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;
char *filecontent = NULL;
char *fixedcontent = NULL;
- if (virtTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate())
+ if (virTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate())
goto failure;
if (filecontent &&
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);
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*)"")))
if (virVBoxSnapshotConfSaveVboxFile(machine, pathResult) < 0)
goto cleanup;
- if (virtTestLoadFile(pathResult, &actual) < 0)
+ if (virTestLoadFile(pathResult, &actual) < 0)
goto cleanup;
if (!(actual = testFilterXML(actual)))
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)
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)))
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)))
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. */