summaryrefslogtreecommitdiff
path: root/tests/testutilsqemu.h
diff options
context:
space:
mode:
authorSebastian Mitterle <smitterl@redhat.com>2020-09-22 11:57:39 +0000
committerPeter Krempa <pkrempa@redhat.com>2020-09-23 22:47:59 +0200
commit9ec77eef2df973373b45e3c3faf52121fc1dfd67 (patch)
tree95ce553ec422b541b33be22485cc42263ad082f9 /tests/testutilsqemu.h
parentafe26f76f2527ea1ccc9b00759f4dfe09f5cd191 (diff)
downloadlibvirt-9ec77eef2df973373b45e3c3faf52121fc1dfd67.tar.gz
qemuxml2argvtest: Test expected error messages
When an error is expected, the error message will be checked. This is expressed by creating an additional ".err" file containing the expected error message. It is added in order to make sure the expected errors are not masked by other errors during test execution while leveraging the existing framework. In order to keep it simple, an input file cannot be reused anymore to cover several expected error cases configured in the test code. An input file can still be reused by creating a test case specific symlink. For consistency, the mock needs to report an error now, too, as every failure must have an error; otherwise a test case will fail. Require LC_ALL=C explicitly to make sure error messages are not localized for testing. Signed-off-by: Sebastian Mitterle <smitterl@redhat.com> Suggested-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Diffstat (limited to 'tests/testutilsqemu.h')
-rw-r--r--tests/testutilsqemu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h
index e7c5032012..66f9cef48e 100644
--- a/tests/testutilsqemu.h
+++ b/tests/testutilsqemu.h
@@ -58,6 +58,7 @@ struct testQemuInfo {
const char *name;
char *infile;
char *outfile;
+ char *errfile;
virQEMUCapsPtr qemuCaps;
const char *migrateFrom;
int migrateFd;