[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/4] iotests: add VerboseProcessError
|
From: |
Eric Blake |
|
Subject: |
Re: [PATCH 2/4] iotests: add VerboseProcessError |
|
Date: |
Tue, 15 Feb 2022 16:58:18 -0600 |
|
User-agent: |
NeoMutt/20211029-322-5436a9 |
On Tue, Feb 15, 2022 at 05:08:51PM -0500, John Snow wrote:
> This adds an Exception that extends the garden variety
> subprocess.CalledProcessError. When this exception is raised, it will
> still be caught when selecting for the stdlib variant.
>
> The difference is that the str() method of this Exception also adds the
> stdout/stderr logs. In effect, if this exception goes unhandled, Python
> will print the output in a nice, highlighted box to the terminal so that
> it's easy to spot.
>
> This should save some headache from having to re-run test suites with
> debugging enabled if we augment the exceptions we print more information
This didn't parse well for me. Maybe
s/enabled/enabled,/ s/print more/print with more/
> in the default case.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> tests/qemu-iotests/iotests.py | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
Otherwise seems useful.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org