[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/14] iotests: change supports_quorum to use qemu_img
From: |
John Snow |
Subject: |
[PATCH 06/14] iotests: change supports_quorum to use qemu_img |
Date: |
Tue, 8 Mar 2022 22:53:59 -0500 |
Similar to other recent changes: use the qemu_img() invocation that
supports throwing loud, nasty exceptions when it fails for surprising
reasons.
(Why would "--help" ever fail? I don't know, but eliminating *all* calls
to qemu-img that do not go through qemu_img() is my goal, so
qemu_img_pipe() has to be removed.)
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/qemu-iotests/iotests.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 3896440238..698d5a7fdc 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -1433,8 +1433,8 @@ def _verify_imgopts(unsupported: Sequence[str] = ()) ->
None:
notrun(f'not suitable for this imgopts: {imgopts}')
-def supports_quorum():
- return 'quorum' in qemu_img_pipe('--help')
+def supports_quorum() -> bool:
+ return 'quorum' in qemu_img('--help').stdout
def verify_quorum():
'''Skip test suite if quorum support is not available'''
--
2.34.1
- Re: [PATCH 01/14] iotests: add qemu_img_json(), (continued)
- [PATCH 02/14] iotests: use qemu_img_json() when applicable, John Snow, 2022/03/08
- [PATCH 04/14] iotests/remove-bitmap-from-backing: use qemu_img_info(), John Snow, 2022/03/08
- [PATCH 03/14] iotests: add qemu_img_info(), John Snow, 2022/03/08
- [PATCH 05/14] iotests: add qemu_img_map() function, John Snow, 2022/03/08
- [PATCH 06/14] iotests: change supports_quorum to use qemu_img,
John Snow <=
- [PATCH 07/14] iotests: replace unchecked calls to qemu_img_pipe(), John Snow, 2022/03/08
- [PATCH 10/14] iotests: use qemu_img() in has_working_luks(), John Snow, 2022/03/08
- [PATCH 08/14] iotests/149: Remove qemu_img_pipe() call, John Snow, 2022/03/08
- [PATCH 12/14] iotests: remove qemu_img_pipe_and_status(), John Snow, 2022/03/08