summary refs log tree commit diff stats
path: root/tests/qemu-iotests/iotests.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-03-21 16:16:11 -0400
committerHanna Reitz <hreitz@redhat.com>2022-03-22 10:14:35 +0100
commit78d04761294c29f115bf8e3a53f4e04521069394 (patch)
treebc2bdf98b1ff314c05e754d357bf2640e3226f12 /tests/qemu-iotests/iotests.py
parent1670ae7af668958e76be6749f1f729d6dc9861e9 (diff)
downloadfocaccia-qemu-78d04761294c29f115bf8e3a53f4e04521069394.tar.gz
focaccia-qemu-78d04761294c29f115bf8e3a53f4e04521069394.zip
iotests: change supports_quorum to use qemu_img
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>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220321201618.903471-12-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r--tests/qemu-iotests/iotests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index b3e793f78a..aaf4da8be4 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -1428,8 +1428,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'''