iotests: ensure all qemu-img calls are either checked or logged
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 25 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | iotests: add qemu_img_json()tests/ | +38 | 4 replies | |
| 2/14 | iotests: use qemu_img_json() when applicabletests/ | +4 | 1 reply | |
| 3/14 | iotests: add qemu_img_info()tests/ tests/ tests/ | +15 | 2 replies | |
| 4/14 | iotests/remove-bitmap-from-backing: use qemu_img_info()tests/ | +3 | 1 reply | |
| 5/14 | iotests: add qemu_img_map() functiontests/ tests/ tests/ +2 more | +14 | 1 reply | |
| 6/14 | iotests: change supports_quorum to use qemu_imgtests/ | +2 | 1 reply | |
| 7/14 | iotests: replace unchecked calls to qemu_img_pipe()tests/ tests/ tests/ +3 more | +10 | 1 reply | |
| 8/14 | iotests/149: Remove qemu_img_pipe() calltests/ tests/ | +5 | 1 reply | |
| 9/14 | iotests: remove remaining calls to qemu_img_pipe()tests/ tests/ tests/ +1 more | +9 | 1 reply | |
| 10/14 | iotests: use qemu_img() in has_working_luks()tests/ | +9 | 1 reply | |
| 11/14 | iotests: replace qemu_img_log('create', ...) callstests/ tests/ tests/ +3 more | +13 | 1 reply | |
| 12/14 | iotests: remove qemu_img_pipe_and_status()tests/ | +7 | 4 replies | |
| 13/14 | iotests: make qemu_img_log() check log leveltests/ | +18 | 1 reply | |
| 14/14 | iotests: make img_info_log() call qemu_img_log()tests/ | +9 | 5 replies |
Reviews trailers per patch
10 of 14 patches have a Reviewed-by or Acked-by.
| Patch | Hanna Reitz |
|---|---|
| 1/14 | |
| 2/14 | R-b |
| 3/14 | R-b |
| 4/14 | R-b |
| 5/14 | |
| 6/14 | R-b |
| 7/14 | R-b |
| 8/14 | R-b |
| 9/14 | R-b |
| 10/14 | R-b |
| 11/14 | R-b |
| 12/14 | |
| 13/14 | R-b |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/14] iotests: ensure all qemu-img calls are either checked or logged
Based-On: [email protected]
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(-)
Signature · 1 line
2.34.1