tests: diagnose open failure

* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Diagnose
failure to open an input file.
This commit is contained in:
Jim Meyering 2009-01-30 21:59:35 +00:00
parent f92e9f599b
commit cf1b0f868b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Fri Jan 30 22:57:34 +0100 2009 Jim Meyering <meyering@redhat.com>
tests: diagnose open failure
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Diagnose
failure to open an input file.
Fri Jan 30 21:50:22 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
* src/domain_conf.c: Fix empty decl in enum declaration

View File

@ -36,8 +36,10 @@ static int testCompareXMLToArgvFiles(const char *xml,
virDomainDefPtr vmdef = NULL;
virDomainObj vm;
if (virtTestLoadFile(cmd, &expectargv, MAX_FILE) < 0)
if (virtTestLoadFile(cmd, &expectargv, MAX_FILE) < 0) {
fprintf(stderr, "failed to open %s: %s\n", cmd, strerror (errno));
goto fail;
}
if (!(vmdef = virDomainDefParseFile(NULL, driver.caps, xml,
VIR_DOMAIN_XML_INACTIVE)))