mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
tests: qemucapsprobemock: Fail if JSON reply from qemu can't be reformatted
Rather than skipping output on failure fail loudly. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
0ed2716531
commit
9369348eb8
@ -86,9 +86,12 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
|
||||
|
||||
ret = realQemuMonitorJSONIOProcessLine(mon, line, msg);
|
||||
|
||||
if (ret == 0 &&
|
||||
(value = virJSONValueFromString(line)) &&
|
||||
(json = virJSONValueToString(value, 1))) {
|
||||
if (ret == 0) {
|
||||
if (!(value = virJSONValueFromString(line)) ||
|
||||
!(json = virJSONValueToString(value, true))) {
|
||||
fprintf(stderr, "Failed to reformat reply string '%s'\n", line);
|
||||
abort();
|
||||
}
|
||||
|
||||
if (first) {
|
||||
first = false;
|
||||
|
Loading…
Reference in New Issue
Block a user