qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [PULL 06/15] tests/qemu-iotests: Fix test 033 for running with non-file protocols
Date: Mon, 18 Mar 2024 14:01:09 +0100	[thread overview]
Message-ID: <20240318130118.358920-7-kwolf@redhat.com> (raw)
In-Reply-To: <20240318130118.358920-1-kwolf@redhat.com>

From: Thomas Huth <thuth@redhat.com>

When running iotest 033 with the ssh protocol, it fails with:

 033   fail       [14:48:31] [14:48:41]   10.2s                output mismatch
 --- /.../tests/qemu-iotests/033.out
 +++ /.../tests/qemu-iotests/scratch/qcow2-ssh-033/033.out.bad
 @@ -174,6 +174,7 @@
  512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
  wrote 512/512 bytes at offset 2097152
  512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 +qemu-io: warning: Failed to truncate the tail of the image: ssh driver does not support shrinking files
  read 512/512 bytes at offset 0
  512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

We already check for the qcow2 format here, so let's simply also
add a check for the protocol here, too, to only test the truncation
with the file protocol.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240315111108.153201-2-thuth@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/033 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
index da9133c44b..4bc7a071bd 100755
--- a/tests/qemu-iotests/033
+++ b/tests/qemu-iotests/033
@@ -123,9 +123,9 @@ do_test 512 "write -P 1 0 0x200" "$TEST_IMG" | _filter_qemu_io
 # next L2 table
 do_test 512 "write -P 1 $L2_COVERAGE 0x200" "$TEST_IMG" | _filter_qemu_io
 
-# only interested in qcow2 here; also other formats might respond with
-#  "not supported" error message
-if [ $IMGFMT = "qcow2" ]; then
+# only interested in qcow2 with file protocol here; also other formats
+# might respond with "not supported" error message
+if [ $IMGFMT = "qcow2" ] && [ $IMGPROTO = "file" ]; then
     do_test 512 "truncate $L2_COVERAGE" "$TEST_IMG" | _filter_qemu_io
 fi
 
-- 
2.44.0



  parent reply	other threads:[~2024-03-18 13:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 13:01 [PULL 00/15] Block layer patches Kevin Wolf
2024-03-18 13:01 ` [PULL 01/15] mirror: Don't call job_pause_point() under graph lock Kevin Wolf
2024-03-18 13:01 ` [PULL 02/15] nbd/server: Fix race in draining the export Kevin Wolf
2024-03-18 13:01 ` [PULL 03/15] iotests: Add test for reset/AioContext switches with NBD exports Kevin Wolf
2024-03-18 13:01 ` [PULL 04/15] blockdev: Fix blockdev-snapshot-sync error reporting for no medium Kevin Wolf
2024-03-18 13:01 ` [PULL 05/15] qemu-img: Fix Column Width and Improve Formatting in snapshot list Kevin Wolf
2024-03-18 13:01 ` Kevin Wolf [this message]
2024-03-18 13:01 ` [PULL 07/15] tests/qemu-iotests: Restrict test 066 to the 'file' protocol Kevin Wolf
2024-03-18 13:01 ` [PULL 08/15] tests/qemu-iotests: Restrict test 114 " Kevin Wolf
2024-03-18 13:01 ` [PULL 09/15] tests/qemu-iotests: Restrict test 130 " Kevin Wolf
2024-03-18 13:01 ` [PULL 10/15] tests/qemu-iotests: Restrict test 134 and 158 " Kevin Wolf
2024-03-18 13:01 ` [PULL 11/15] tests/qemu-iotests: Restrict test 156 " Kevin Wolf
2024-03-18 13:01 ` [PULL 12/15] tests/qemu-iotests: Restrict tests that use --image-opts " Kevin Wolf
2024-03-18 13:01 ` [PULL 13/15] tests/qemu-iotests: Fix some tests that use --image-opts for other protocols Kevin Wolf
2024-03-18 13:01 ` [PULL 14/15] tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol Kevin Wolf
2024-03-18 13:01 ` [PULL 15/15] iotests: adapt to output change for recently introduced 'detached header' field Kevin Wolf
2024-03-19 10:23 ` [PULL 00/15] Block layer patches Peter Maydell

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=20240318130118.358920-7-kwolf@redhat.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).