diff options
| author | John Snow <jsnow@redhat.com> | 2022-03-21 16:16:04 -0400 |
|---|---|---|
| committer | Hanna Reitz <hreitz@redhat.com> | 2022-03-22 10:14:26 +0100 |
| commit | 2882ccf86a9bc7ea9ae23dce2bad91c8d3e7e135 (patch) | |
| tree | aded8a4dfc87502c6907aef078d7ea7b223152e4 /qapi/string-output-visitor.c | |
| parent | fc272d3ce0094d2c2aff973662536d8d1a6943e5 (diff) | |
| download | focaccia-qemu-2882ccf86a9bc7ea9ae23dce2bad91c8d3e7e135.tar.gz focaccia-qemu-2882ccf86a9bc7ea9ae23dce2bad91c8d3e7e135.zip | |
iotests: make qemu_img raise on non-zero rc by default
re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed process run. Users that want something more flexible (there appears to be only one) can use check=False and manage the return themselves. However, when the return code is negative, the Exception will be raised no matter what. This is done under the belief that there's no legitimate reason, even in negative tests, to see a crash from qemu-img. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220321201618.903471-5-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'qapi/string-output-visitor.c')
0 files changed, 0 insertions, 0 deletions