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