aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-04-18 17:14:54 -0400
committerHanna Reitz <hreitz@redhat.com>2022-04-25 14:30:03 +0200
commita19052496709d0999d777f0cb1fbd532958196c6 (patch)
tree746013e638bde0ee8d8c56bf1e3b070f051df4ac /tests
parent093a13acbf6be15de01cbf4afc27fb4193fd49ee (diff)
downloadqemu-a19052496709d0999d777f0cb1fbd532958196c6.zip
qemu-a19052496709d0999d777f0cb1fbd532958196c6.tar.gz
qemu-a19052496709d0999d777f0cb1fbd532958196c6.tar.bz2
iotests/163: Fix broken qemu-io invocation
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> Message-Id: <20220418211504.943969-3-jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/1635
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163
index e4cd4b2..c94ad16 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()