All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] iotests: ensure all qemu-img calls are either checked or logged
@ 2022-03-09  3:53 John Snow
  2022-03-09  3:53 ` [PATCH 01/14] iotests: add qemu_img_json() John Snow
                   ` (13 more replies)
  0 siblings, 14 replies; 40+ messages in thread
From: John Snow @ 2022-03-09  3:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, John Snow, Hanna Reitz, Eric Blake, qemu-block

Based-On: 20220308015728.1269649-1-jsnow@redhat.com

Hi, this series ensures all calls to qemu-img ultimately go through
qemu_img(). After the previous series, qemu_img() is a function that
defaults to raising a VerboseProcessError exception when qemu-img
returns a non-zero exit code.

After this series, all qemu-img invocations from the iotests suite are
guaranteed to go through either qemu_img_log(), which allows non-zero
exit codes (but logs its output), or qemu_img().

Some callsites manually disable the error checking with check=False,
which is a good visual reminder directly at the callsite that additional
verification must be performed. The callsites utilizing this are very
few and far between.

The VerboseProcessError exception will print the command line, return
code, and all console output to the terminal if it goes unhandled. In
effect, all non-logging calls to qemu-img are now guaranteed to print
detailed failure information to the terminal on any unanticipated
behavior.

(Even logging calls will still raise this exception if the exit code was
negative, so you get all of the same failure output whenever qemu-img
crashes *anywhere* in iotests now.)

As a result of this change, some of the helpers change. Here's a summary
of the changes between the last series and this one:

qemu_img()                   => qemu_img().returncode
qemu_img_pipe()              => qemu_img().stdout
qemu_img_pipe_and_status()   => qemu_img()
json.loads(qemu_img_pipe())) => qemu_img_json()
qemu_img_log()               => qemu_img_log()

John Snow (14):
  iotests: add qemu_img_json()
  iotests: use qemu_img_json() when applicable
  iotests: add qemu_img_info()
  iotests/remove-bitmap-from-backing: use qemu_img_info()
  iotests: add qemu_img_map() function
  iotests: change supports_quorum to use qemu_img
  iotests: replace unchecked calls to qemu_img_pipe()
  iotests/149: Remove qemu_img_pipe() call
  iotests: remove remaining calls to qemu_img_pipe()
  iotests: use qemu_img() in has_working_luks()
  iotests: replace qemu_img_log('create', ...) calls
  iotests: remove qemu_img_pipe_and_status()
  iotests: make qemu_img_log() check log level
  iotests: make img_info_log() call qemu_img_log()

 tests/qemu-iotests/041                        |   5 +-
 tests/qemu-iotests/065                        |   7 +-
 tests/qemu-iotests/149                        |   7 +-
 tests/qemu-iotests/149.out                    |  21 ---
 tests/qemu-iotests/194                        |   4 +-
 tests/qemu-iotests/202                        |   4 +-
 tests/qemu-iotests/203                        |   4 +-
 tests/qemu-iotests/211                        |   6 +-
 tests/qemu-iotests/234                        |   4 +-
 tests/qemu-iotests/237                        |   3 +-
 tests/qemu-iotests/237.out                    |   3 -
 tests/qemu-iotests/242                        |   5 +-
 tests/qemu-iotests/255                        |   8 +-
 tests/qemu-iotests/255.out                    |   4 -
 tests/qemu-iotests/262                        |   2 +-
 tests/qemu-iotests/274                        |  17 ++-
 tests/qemu-iotests/274.out                    |  29 ----
 tests/qemu-iotests/280                        |   2 +-
 tests/qemu-iotests/280.out                    |   1 -
 tests/qemu-iotests/296                        |  12 +-
 tests/qemu-iotests/303                        |   2 +-
 tests/qemu-iotests/iotests.py                 | 134 +++++++++++++-----
 tests/qemu-iotests/tests/block-status-cache   |  11 +-
 .../qemu-iotests/tests/parallels-read-bitmap  |   6 +-
 .../tests/remove-bitmap-from-backing          |   6 +-
 25 files changed, 150 insertions(+), 157 deletions(-)

-- 
2.34.1




^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2022-03-17 18:51 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  3:53 [PATCH 00/14] iotests: ensure all qemu-img calls are either checked or logged John Snow
2022-03-09  3:53 ` [PATCH 01/14] iotests: add qemu_img_json() John Snow
2022-03-17 10:53   ` Hanna Reitz
2022-03-17 14:42     ` John Snow
2022-03-17 14:51       ` Hanna Reitz
2022-03-17 15:30         ` John Snow
2022-03-09  3:53 ` [PATCH 02/14] iotests: use qemu_img_json() when applicable John Snow
2022-03-17 10:59   ` Hanna Reitz
2022-03-09  3:53 ` [PATCH 03/14] iotests: add qemu_img_info() John Snow
2022-03-17 11:09   ` Hanna Reitz
2022-03-17 14:51     ` John Snow
2022-03-09  3:53 ` [PATCH 04/14] iotests/remove-bitmap-from-backing: use qemu_img_info() John Snow
2022-03-17 11:19   ` Hanna Reitz
2022-03-09  3:53 ` [PATCH 05/14] iotests: add qemu_img_map() function John Snow
2022-03-17 11:26   ` Hanna Reitz
2022-03-09  3:53 ` [PATCH 06/14] iotests: change supports_quorum to use qemu_img John Snow
2022-03-17 11:35   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 07/14] iotests: replace unchecked calls to qemu_img_pipe() John Snow
2022-03-17 11:38   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 08/14] iotests/149: Remove qemu_img_pipe() call John Snow
2022-03-17 12:09   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 09/14] iotests: remove remaining calls to qemu_img_pipe() John Snow
2022-03-17 12:43   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 10/14] iotests: use qemu_img() in has_working_luks() John Snow
2022-03-17 13:13   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 11/14] iotests: replace qemu_img_log('create', ...) calls John Snow
2022-03-17 14:44   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 12/14] iotests: remove qemu_img_pipe_and_status() John Snow
2022-03-17 15:28   ` Hanna Reitz
2022-03-17 15:58     ` John Snow
2022-03-17 16:04       ` Hanna Reitz
2022-03-17 17:10         ` John Snow
2022-03-09  3:54 ` [PATCH 13/14] iotests: make qemu_img_log() check log level John Snow
2022-03-17 15:34   ` Hanna Reitz
2022-03-09  3:54 ` [PATCH 14/14] iotests: make img_info_log() call qemu_img_log() John Snow
2022-03-17 15:38   ` Hanna Reitz
2022-03-17 17:00     ` John Snow
2022-03-17 17:45       ` John Snow
2022-03-17 18:26         ` Hanna Reitz
2022-03-17 18:32           ` John Snow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.