aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/iotests.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-04-18 17:15:03 -0400
committerHanna Reitz <hreitz@redhat.com>2022-04-25 14:30:34 +0200
commit72cfb937b833ea6f49d022e1c7705eb9017a7c5d (patch)
tree47e2df3c0c7259277afbca64e6855988f2aeadaa /tests/qemu-iotests/iotests.py
parent23d44dcb7c247347a0c3e4565c4cd7e4d2a5183a (diff)
iotests: remove qemu_io_silent() and qemu_io_silent_check().
Like qemu-img, qemu-io returning 0 should be the norm and not the exception. Remove all calls to qemu_io_silent that just assert the return code is zero (That's every last call, as it turns out), and replace them with a normal qemu_io() call. qemu_io_silent_check() appeared to have been unused already. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220418211504.943969-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.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index a13e6fa876..d1661f11ff 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -369,22 +369,6 @@ def qemu_io_log(*args: str) -> 'subprocess.CompletedProcess[str]':
log(result.stdout, filters=[filter_testfiles, filter_qemu_io])
return result
-def qemu_io_silent(*args):
- '''Run qemu-io and return the exit code, suppressing stdout'''
- args = qemu_io_wrap_args(args)
- result = subprocess.run(args, stdout=subprocess.DEVNULL, check=False)
- if result.returncode < 0:
- sys.stderr.write('qemu-io received signal %i: %s\n' %
- (-result.returncode, ' '.join(args)))
- return result.returncode
-
-def qemu_io_silent_check(*args):
- '''Run qemu-io and return the true if subprocess returned 0'''
- args = qemu_io_wrap_args(args)
- result = subprocess.run(args, stdout=subprocess.DEVNULL,
- stderr=subprocess.STDOUT, check=False)
- return result.returncode == 0
-
class QemuIoInteractive:
def __init__(self, *args):
self.args = qemu_io_wrap_args(args)