V3:
 - Rebase on origin/master
 - Expand 3/5 to cover new uses upstream
 - Fix reflow nit by eblake on 3/5

V2:
 - Rebase on top of kwolf's latest PR.
 - Adjust tests/graph-changes-while-io in patch 3/5
 - Drop eblake's r-b on 3/5.

This is 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!)

NOTES:

(1) 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.

(2) ... And then another 10 or so to give the same treatment to all
qemu_io() calls.

(3) ... And I'm working on the same for qemu_nbd(). Ultimately I want to
make every last subprocess call one that's checked and can produce nice
diagnostic info to the terminal if it goes unhandled.

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                        |  13 +-
 tests/qemu-iotests/iotests.py                 |  71 +++++++++--
 tests/qemu-iotests/tests/block-status-cache   |   3 +-
 .../qemu-iotests/tests/graph-changes-while-io |   7 +-
 tests/qemu-iotests/tests/image-fleecing       |  10 +-
 .../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 +-
 17 files changed, 226 insertions(+), 68 deletions(-)

-- 
2.34.1



Reply via email to