aboutsummaryrefslogtreecommitdiff
path: root/chardev/baum.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-03-21 16:16:06 -0400
committerHanna Reitz <hreitz@redhat.com>2022-03-22 10:14:28 +0100
commit29768d04afe5c87272e8fb7de1290f7a4f530785 (patch)
tree2bf8cadeea979a8c3fed38e0596fda55f7c0bee8 /chardev/baum.c
parent569131d585efb9a2fe9188c0edd12d22619afaca (diff)
downloadqemu-29768d04afe5c87272e8fb7de1290f7a4f530785.zip
qemu-29768d04afe5c87272e8fb7de1290f7a4f530785.tar.gz
qemu-29768d04afe5c87272e8fb7de1290f7a4f530785.tar.bz2
iotests: add qemu_img_json()
qemu_img_json() is a new helper built on top of qemu_img() that tries to pull a valid JSON document out of the stdout stream. In the event that the return code is negative (the program crashed), or the code is greater than zero and did not produce valid JSON output, the VerboseProcessError raised by qemu_img() is re-raised. In the event that the return code is zero but we can't parse valid JSON, allow the JSON deserialization error to be raised. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20220321201618.903471-7-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'chardev/baum.c')
0 files changed, 0 insertions, 0 deletions