[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/12] iotests/163: Fix broken qemu-io invocation
From: |
John Snow |
Subject: |
[PATCH v3 02/12] iotests/163: Fix broken qemu-io invocation |
Date: |
Mon, 18 Apr 2022 17:14:54 -0400 |
The 'read' commands to qemu-io were malformed, and this invocation only
worked by coincidence because the error messages were identical. Oops.
There's no point in checking the patterning of the reference image, so
just check the empty image by itself instead.
(Note: as of this commit, nothing actually enforces that this command
completes successfully, but a forthcoming commit in this series will
enforce that qemu_io() must have a zero status code.)
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
---
tests/qemu-iotests/163 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163
index e4cd4b230f3..c94ad16f4a7 100755
--- a/tests/qemu-iotests/163
+++ b/tests/qemu-iotests/163
@@ -113,10 +113,7 @@ class ShrinkBaseClass(iotests.QMPTestCase):
qemu_img('resize', '-f', iotests.imgfmt, '--shrink', test_img,
self.shrink_size)
- self.assertEqual(
- qemu_io('-c', 'read -P 0x00 %s'%self.shrink_size, test_img),
- qemu_io('-c', 'read -P 0x00 %s'%self.shrink_size, check_img),
- "Verifying image content")
+ qemu_io('-c', f"read -P 0x00 0 {self.shrink_size}", test_img)
self.image_verify()
--
2.34.1
- [PATCH v3 00/12] iotests: add enhanced debugging info to qemu-io failures, John Snow, 2022/04/18
- [PATCH v3 01/12] iotests: replace calls to log(qemu_io(...)) with qemu_io_log(), John Snow, 2022/04/18
- [PATCH v3 09/12] iotests/image-fleecing: switch to qemu_io(), John Snow, 2022/04/18
- [PATCH v3 02/12] iotests/163: Fix broken qemu-io invocation,
John Snow <=
- [PATCH v3 04/12] iotests/040: Don't check image pattern on zero-length image, John Snow, 2022/04/18
- [PATCH v3 06/12] iotests: create generic qemu_tool() function, John Snow, 2022/04/18
- [PATCH v3 07/12] iotests: rebase qemu_io() on top of qemu_tool(), John Snow, 2022/04/18
- [PATCH v3 05/12] iotests/040: Fix TestCommitWithFilters test, John Snow, 2022/04/18
- [PATCH v3 11/12] iotests: remove qemu_io_silent() and qemu_io_silent_check()., John Snow, 2022/04/18
- [PATCH v3 03/12] iotests: Don't check qemu_io() output for specific error strings, John Snow, 2022/04/18
- [PATCH v3 10/12] iotests: remove qemu_io_pipe_and_status(), John Snow, 2022/04/18
- [PATCH v3 12/12] iotests: make qemu_io_log() check return codes by default, John Snow, 2022/04/18
- [PATCH v3 08/12] iotests/migration-permissions: use assertRaises() for qemu_io() negative test, John Snow, 2022/04/18