[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] iotests: make qemu_img raise on non-zero rc by default
From: |
Eric Blake |
Subject: |
Re: [PATCH 4/5] iotests: make qemu_img raise on non-zero rc by default |
Date: |
Thu, 3 Mar 2022 20:46:39 -0600 |
User-agent: |
NeoMutt/20211029-378-f757a4 |
On Thu, Mar 03, 2022 at 03:59:01PM -0500, John Snow wrote:
> 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>
> ---
> tests/qemu-iotests/257 | 8 ++++--
> tests/qemu-iotests/iotests.py | 54 +++++++++++++++++++++++++++++++----
> 2 files changed, 53 insertions(+), 9 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH 0/5] iotests: add enhanced debugging info to qemu-img failures, John Snow, 2022/03/03
- [PATCH 1/5] python/utils: add add_visual_margin() text decoration utility, John Snow, 2022/03/03
- [PATCH 2/5] python/utils: add VerboseProcessError, John Snow, 2022/03/03
- [PATCH 3/5] iotests: Remove explicit checks for qemu_img() == 0, John Snow, 2022/03/03
- [PATCH 4/5] iotests: make qemu_img raise on non-zero rc by default, John Snow, 2022/03/03
- Re: [PATCH 4/5] iotests: make qemu_img raise on non-zero rc by default,
Eric Blake <=
- [PATCH 5/5] iotests: fortify compare_images() against crashes, John Snow, 2022/03/03