[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/14] iotests: make qemu_io_log() check return codes by default
From: |
Hanna Reitz |
Subject: |
[PULL 13/14] iotests: make qemu_io_log() check return codes by default |
Date: |
Mon, 25 Apr 2022 16:08:20 +0200 |
From: John Snow <jsnow@redhat.com>
Just like qemu_img_log(), upgrade qemu_io_log() to enforce a return code
of zero by default.
Tests that use qemu_io_log(): 242 245 255 274 303 307 nbd-reconnect-on-open
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-13-jsnow@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
---
tests/qemu-iotests/iotests.py | 5 +++--
tests/qemu-iotests/tests/nbd-reconnect-on-open | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index d1661f11ff..da7d6637e1 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -364,8 +364,9 @@ def qemu_io(*args: str, check: bool = True, combine_stdio:
bool = True
return qemu_tool(*qemu_io_wrap_args(args),
check=check, combine_stdio=combine_stdio)
-def qemu_io_log(*args: str) -> 'subprocess.CompletedProcess[str]':
- result = qemu_io(*args, check=False)
+def qemu_io_log(*args: str, check: bool = True
+ ) -> 'subprocess.CompletedProcess[str]':
+ result = qemu_io(*args, check=check)
log(result.stdout, filters=[filter_testfiles, filter_qemu_io])
return result
diff --git a/tests/qemu-iotests/tests/nbd-reconnect-on-open
b/tests/qemu-iotests/tests/nbd-reconnect-on-open
index 8be721a24f..d0b401b060 100755
--- a/tests/qemu-iotests/tests/nbd-reconnect-on-open
+++ b/tests/qemu-iotests/tests/nbd-reconnect-on-open
@@ -39,7 +39,7 @@ def check_fail_to_connect(open_timeout):
log(f'Check fail to connect with {open_timeout} seconds of timeout')
start_t = time.time()
- qemu_io_log(*create_args(open_timeout))
+ qemu_io_log(*create_args(open_timeout), check=False)
delta_t = time.time() - start_t
max_delta = open_timeout + 0.2
--
2.35.1
- [PULL 02/14] iotests: replace calls to log(qemu_io(...)) with qemu_io_log(), (continued)
- [PULL 02/14] iotests: replace calls to log(qemu_io(...)) with qemu_io_log(), Hanna Reitz, 2022/04/25
- [PULL 03/14] iotests/163: Fix broken qemu-io invocation, Hanna Reitz, 2022/04/25
- [PULL 04/14] iotests: Don't check qemu_io() output for specific error strings, Hanna Reitz, 2022/04/25
- [PULL 05/14] iotests/040: Don't check image pattern on zero-length image, Hanna Reitz, 2022/04/25
- [PULL 06/14] iotests/040: Fix TestCommitWithFilters test, Hanna Reitz, 2022/04/25
- [PULL 07/14] iotests: create generic qemu_tool() function, Hanna Reitz, 2022/04/25
- [PULL 09/14] iotests/migration-permissions: use assertRaises() for qemu_io() negative test, Hanna Reitz, 2022/04/25
- [PULL 08/14] iotests: rebase qemu_io() on top of qemu_tool(), Hanna Reitz, 2022/04/25
- [PULL 10/14] iotests/image-fleecing: switch to qemu_io(), Hanna Reitz, 2022/04/25
- [PULL 12/14] iotests: remove qemu_io_silent() and qemu_io_silent_check()., Hanna Reitz, 2022/04/25
- [PULL 13/14] iotests: make qemu_io_log() check return codes by default,
Hanna Reitz <=
- [PULL 11/14] iotests: remove qemu_io_pipe_and_status(), Hanna Reitz, 2022/04/25
- [PULL 14/14] iotests/108: Fix when missing user_allow_other, Hanna Reitz, 2022/04/25
- Re: [PULL 00/14] Block patches, Richard Henderson, 2022/04/25