mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-06 09:55:46 +00:00
virjsontest: use the test name in AddRemove test
Instead of printing the whole JSON in error messages, print just the test name. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b565e40705
commit
c61e729382
@ -78,7 +78,7 @@ testJSONAddRemove(const void *data)
|
|||||||
|
|
||||||
json = virJSONValueFromString(info->doc);
|
json = virJSONValueFromString(info->doc);
|
||||||
if (!json) {
|
if (!json) {
|
||||||
VIR_TEST_VERBOSE("Fail to parse %s\n", info->doc);
|
VIR_TEST_VERBOSE("Fail to parse %s\n", info->name);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ testJSONAddRemove(const void *data)
|
|||||||
case 1:
|
case 1:
|
||||||
if (!info->pass) {
|
if (!info->pass) {
|
||||||
VIR_TEST_VERBOSE("should not remove from non-object %s\n",
|
VIR_TEST_VERBOSE("should not remove from non-object %s\n",
|
||||||
info->doc);
|
info->name);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -95,11 +95,11 @@ testJSONAddRemove(const void *data)
|
|||||||
if (!info->pass)
|
if (!info->pass)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
else
|
else
|
||||||
VIR_TEST_VERBOSE("Fail to recognize non-object %s\n", info->doc);
|
VIR_TEST_VERBOSE("Fail to recognize non-object %s\n", info->name);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
default:
|
default:
|
||||||
VIR_TEST_VERBOSE("unexpected result when removing from %s\n",
|
VIR_TEST_VERBOSE("unexpected result when removing from %s\n",
|
||||||
info->doc);
|
info->name);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (STRNEQ_NULLABLE(virJSONValueGetString(name), "sample")) {
|
if (STRNEQ_NULLABLE(virJSONValueGetString(name), "sample")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user