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>
This commit is contained in:
John Snow 2022-03-21 16:16:11 -04:00 committed by Hanna Reitz
parent 1670ae7af6
commit 78d0476129

View file

@ -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'''