mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
tests: improve test failure diagnosis
* qemuhelptest prints test case name on failure.
This commit is contained in:
parent
3abadf82d7
commit
42b23434b0
@ -77,8 +77,8 @@ static int testHelpStrParsing(const void *data)
|
|||||||
|
|
||||||
if (STRNEQ(got, expected)) {
|
if (STRNEQ(got, expected)) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Computed flags do not match: got %s, expected %s\n",
|
"%s: computed flags do not match: got %s, expected %s\n",
|
||||||
got, expected);
|
info->name, got, expected);
|
||||||
|
|
||||||
if (getenv("VIR_TEST_DEBUG"))
|
if (getenv("VIR_TEST_DEBUG"))
|
||||||
printMismatchedFlags(flags, info->flags);
|
printMismatchedFlags(flags, info->flags);
|
||||||
@ -87,22 +87,22 @@ static int testHelpStrParsing(const void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (version != info->version) {
|
if (version != info->version) {
|
||||||
fprintf(stderr, "Parsed versions do not match: got %u, expected %u\n",
|
fprintf(stderr, "%s: parsed versions do not match: got %u, expected %u\n",
|
||||||
version, info->version);
|
info->name, version, info->version);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_kvm != info->is_kvm) {
|
if (is_kvm != info->is_kvm) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Parsed is_kvm flag does not match: got %u, expected %u\n",
|
"%s: parsed is_kvm flag does not match: got %u, expected %u\n",
|
||||||
is_kvm, info->is_kvm);
|
info->name, is_kvm, info->is_kvm);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kvm_version != info->kvm_version) {
|
if (kvm_version != info->kvm_version) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Parsed KVM versions do not match: got %u, expected %u\n",
|
"%s: parsed KVM versions do not match: got %u, expected %u\n",
|
||||||
kvm_version, info->kvm_version);
|
info->name, kvm_version, info->kvm_version);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user