All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>,
	Hanna Reitz <hreitz@redhat.com>, John Snow <jsnow@redhat.com>,
	qemu-block@nongnu.org
Subject: [PATCH v2 02/17] iotests/163: Fix broken qemu-io invocation
Date: Thu, 24 Mar 2022 14:30:03 -0400	[thread overview]
Message-ID: <20220324183018.2476551-3-jsnow@redhat.com> (raw)
In-Reply-To: <20220324183018.2476551-1-jsnow@redhat.com>

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 e4cd4b230f..c94ad16f4a 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



  parent reply	other threads:[~2022-03-24 18:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 18:30 [PATCH v2 00/17] iotests: add enhanced debugging info to qemu-io failures John Snow
2022-03-24 18:30 ` [PATCH v2 01/17] iotests: replace calls to log(qemu_io(...)) with qemu_io_log() John Snow
2022-03-25 13:25   ` Hanna Reitz
2022-03-24 18:30 ` John Snow [this message]
2022-03-24 18:30 ` [PATCH v2 03/17] iotests: Don't check qemu_io() output for specific error strings John Snow
2022-03-24 18:30 ` [PATCH v2 04/17] iotests/040: Don't check image pattern on zero-length image John Snow
2022-03-24 18:30 ` [PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test John Snow
2022-03-25  1:33   ` Eric Blake
2022-03-31 16:36     ` John Snow
2022-03-25 13:40   ` Hanna Reitz
2022-03-25 15:06     ` John Snow
2022-03-24 18:30 ` [PATCH v2 06/17] iotests: create generic qemu_tool() function John Snow
2022-03-24 18:30 ` [PATCH v2 07/17] iotests: rebase qemu_io() on top of qemu_tool() John Snow
2022-03-24 18:30 ` [PATCH v2 08/17] iotests/030: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 09/17] iotests/149: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 10/17] iotests/205: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 11/17] iotests/245: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 12/17] iotests/migration-permissions: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 13/17] iotests/migration-permissions: use assertRaises() for qemu_io() negative test John Snow
2022-03-25  1:36   ` Eric Blake
2022-03-24 18:30 ` [PATCH v2 14/17] iotests/image-fleecing: switch to qemu_io() John Snow
2022-03-25  1:38   ` Eric Blake
2022-03-25 14:24   ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 15/17] iotests: remove qemu_io_pipe_and_status() John Snow
2022-03-25  1:39   ` Eric Blake
2022-03-25 14:25   ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 16/17] iotests: remove qemu_io_silent() and qemu_io_silent_check() John Snow
2022-03-24 18:30 ` [PATCH v2 17/17] iotests: make qemu_io_log() check return codes by default John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220324183018.2476551-3-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.