All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [PATCH for-6.0 v3 07/20] iotests: Do not needlessly filter _make_test_img
Date: Tue, 27 Oct 2020 20:05:47 +0100	[thread overview]
Message-ID: <20201027190600.192171-8-mreitz@redhat.com> (raw)
In-Reply-To: <20201027190600.192171-1-mreitz@redhat.com>

In most cases, _make_test_img does not need a _filter_imgfmt on top.  It
does that by itself.

(The exception is when IMGFMT has been overwritten but TEST_IMG has not.
In such cases, we do need a _filter_imgfmt on top to filter the test's
original IMGFMT from TEST_IMG.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/161 | 12 ++++++------
 tests/qemu-iotests/175 |  6 +++---
 tests/qemu-iotests/249 |  6 +++---
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/qemu-iotests/161 b/tests/qemu-iotests/161
index e270976d87..bbf7dbbc5c 100755
--- a/tests/qemu-iotests/161
+++ b/tests/qemu-iotests/161
@@ -48,9 +48,9 @@ _supported_os Linux
 IMG_SIZE=1M
 
 # Create the images
-TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE | _filter_imgfmt
-TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT | _filter_imgfmt
-_make_test_img -b "$TEST_IMG.int" -F $IMGFMT -F $IMGFMT | _filter_imgfmt
+TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
+TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT
+_make_test_img -b "$TEST_IMG.int" -F $IMGFMT -F $IMGFMT
 
 # First test: reopen $TEST.IMG changing the detect-zeroes option on
 # its backing file ($TEST_IMG.int).
@@ -105,9 +105,9 @@ echo
 echo "*** Commit and then change an option on the backing file"
 echo
 # Create the images again
-TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE | _filter_imgfmt
-TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT| _filter_imgfmt
-_make_test_img -b "$TEST_IMG.int" -F $IMGFMT | _filter_imgfmt
+TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
+TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT
+_make_test_img -b "$TEST_IMG.int" -F $IMGFMT
 
 _launch_qemu -drive if=none,file="${TEST_IMG}"
 _send_qemu_cmd $QEMU_HANDLE \
diff --git a/tests/qemu-iotests/175 b/tests/qemu-iotests/175
index 00a626aa63..c3c2aed653 100755
--- a/tests/qemu-iotests/175
+++ b/tests/qemu-iotests/175
@@ -89,20 +89,20 @@ min_blocks=$(stat -c '%b' "$TEST_DIR/empty")
 
 echo
 echo "== creating image with default preallocation =="
-_make_test_img -o extent_size_hint=0 $size | _filter_imgfmt
+_make_test_img -o extent_size_hint=0 $size
 stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $min_blocks $size
 
 for mode in off full falloc; do
     echo
     echo "== creating image with preallocation $mode =="
-    _make_test_img -o preallocation=$mode,extent_size_hint=0 $size | _filter_imgfmt
+    _make_test_img -o preallocation=$mode,extent_size_hint=0 $size
     stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $min_blocks $size
 done
 
 for new_size in 4096 1048576; do
     echo
     echo "== resize empty image with block_resize =="
-    _make_test_img -o extent_size_hint=0 0 | _filter_imgfmt
+    _make_test_img -o extent_size_hint=0 0
     _block_resize $TEST_IMG $new_size >/dev/null
     stat -c "size=%s, blocks=%b" $TEST_IMG | _filter_blocks $extra_blocks $min_blocks $new_size
 done
diff --git a/tests/qemu-iotests/249 b/tests/qemu-iotests/249
index 68f13ed328..a9aa9303eb 100755
--- a/tests/qemu-iotests/249
+++ b/tests/qemu-iotests/249
@@ -48,9 +48,9 @@ _supported_os Linux
 IMG_SIZE=1M
 
 # Create the images: base <- int <- active
-TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE | _filter_imgfmt
-TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT | _filter_imgfmt
-_make_test_img -b "$TEST_IMG.int" -F $IMGFMT | _filter_imgfmt
+TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
+TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT
+_make_test_img -b "$TEST_IMG.int" -F $IMGFMT
 
 # Launch QEMU with these two drives:
 # none0: base (read-only)
-- 
2.26.2



  parent reply	other threads:[~2020-10-27 19:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 19:05 [PATCH for-6.0 v3 00/20] block/export: Allow exporting BDSs via FUSE Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 01/20] meson: Detect libfuse Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 02/20] fuse: Allow exporting BDSs via FUSE Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 03/20] fuse: Implement standard FUSE operations Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 04/20] fuse: Allow growable exports Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 05/20] fuse: (Partially) implement fallocate() Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 06/20] fuse: Implement hole detection through lseek Max Reitz
2020-10-27 19:05 ` Max Reitz [this message]
2020-10-27 19:05 ` [PATCH for-6.0 v3 08/20] iotests: Do not pipe _make_test_img Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 09/20] iotests: Use convert -n in some cases Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 10/20] iotests/046: Avoid renaming images Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 11/20] iotests: Derive image names from $TEST_IMG Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 12/20] iotests/091: Use _cleanup_qemu instad of "wait" Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 13/20] iotests: Restrict some Python tests to file Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 14/20] iotests: Let _make_test_img guess $TEST_IMG_FILE Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 15/20] iotests/287: Clean up subshell test image Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 16/20] storage-daemon: Call bdrv_close_all() on exit Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 17/20] iotests: Give access to the qemu-storage-daemon Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 18/20] iotests: Allow testing FUSE exports Max Reitz
2020-10-27 19:05 ` [PATCH for-6.0 v3 19/20] iotests: Enable fuse for many tests Max Reitz
2020-10-27 19:06 ` [PATCH for-6.0 v3 20/20] iotests/308: Add test for FUSE exports Max Reitz
2020-12-07 15:15 ` [PATCH for-6.0 v3 00/20] block/export: Allow exporting BDSs via FUSE Kevin Wolf

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=20201027190600.192171-8-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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.