From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Thomas Huth <thuth@redhat.com>,
Beraldo Leal <bleal@redhat.com>,
qemu-block@nongnu.org, Eric Blake <eblake@redhat.com>,
Hanna Reitz <hreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: [PATCH 0/5] iotests: add enhanced debugging info to qemu-img failures
Date: Thu, 3 Mar 2022 15:58:57 -0500 [thread overview]
Message-ID: <20220303205902.4106779-1-jsnow@redhat.com> (raw)
This is kinda-sorta V3-ish of a series I started in response to Thomas
Huth's encountering a failure in qemu-img because of missing zstd
support. This series changes the qemu_img() function in iotests.py to
one that raises an Exception on non-zero return code by default.
Alongside this, the Exception object itself is also augmented so that it
prints the stdout/stderr logs to screen if the exception goes unhandled
so that failure cases are very obvious and easy to spot in the middle of
python tracebacks.
(Test this out yourself: Disable zstd support and then run qcow2 iotest
065 before and after this patchset. It makes a real difference!)
NOTE: I have another 13-ish patches that go the rest of the way and
ensure that *every* call to qemu-img goes through this new qemu_img()
function, but for the sake of doing the most good in the shortest amount
of time, I am sending just the first 5 patches, and the rest will be
sent later. I think this is a very good series to get in before freeze
so that we have it during the heavy testing season.
John Snow (5):
python/utils: add add_visual_margin() text decoration utility
python/utils: add VerboseProcessError
iotests: Remove explicit checks for qemu_img() == 0
iotests: make qemu_img raise on non-zero rc by default
iotests: fortify compare_images() against crashes
python/qemu/utils/__init__.py | 114 ++++++++++++++++++
tests/qemu-iotests/163 | 9 +-
tests/qemu-iotests/216 | 6 +-
tests/qemu-iotests/218 | 2 +-
tests/qemu-iotests/224 | 11 +-
tests/qemu-iotests/228 | 12 +-
tests/qemu-iotests/257 | 11 +-
tests/qemu-iotests/258 | 4 +-
tests/qemu-iotests/310 | 14 +--
tests/qemu-iotests/iotests.py | 69 +++++++++--
tests/qemu-iotests/tests/block-status-cache | 3 +-
tests/qemu-iotests/tests/image-fleecing | 4 +-
.../tests/mirror-ready-cancel-error | 6 +-
tests/qemu-iotests/tests/mirror-top-perms | 3 +-
.../tests/remove-bitmap-from-backing | 8 +-
.../qemu-iotests/tests/stream-error-on-reset | 4 +-
16 files changed, 220 insertions(+), 60 deletions(-)
--
2.34.1
next reply other threads:[~2022-03-03 21:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 20:58 John Snow [this message]
2022-03-03 20:58 ` [PATCH 1/5] python/utils: add add_visual_margin() text decoration utility John Snow
2022-03-03 22:43 ` Eric Blake
2022-03-04 16:21 ` John Snow
2022-03-03 20:58 ` [PATCH 2/5] python/utils: add VerboseProcessError John Snow
2022-03-04 2:41 ` Eric Blake
2022-03-03 20:59 ` [PATCH 3/5] iotests: Remove explicit checks for qemu_img() == 0 John Snow
2022-03-03 20:59 ` [PATCH 4/5] iotests: make qemu_img raise on non-zero rc by default John Snow
2022-03-04 2:46 ` Eric Blake
2022-03-03 20:59 ` [PATCH 5/5] iotests: fortify compare_images() against crashes John Snow
2022-03-04 2:49 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220303205902.4106779-1-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).