[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/18] iotests: Do not needlessly filter _make_test_img
From: |
Max Reitz |
Subject: |
[PATCH 08/18] iotests: Do not needlessly filter _make_test_img |
Date: |
Thu, 19 Dec 2019 15:38:08 +0100 |
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 <address@hidden>
---
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 f572a19af2..f9b44e52cf 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" | _filter_imgfmt
-_make_test_img -b "$TEST_IMG.int" | _filter_imgfmt
+TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
+TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base"
+_make_test_img -b "$TEST_IMG.int"
# 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" | _filter_imgfmt
-_make_test_img -b "$TEST_IMG.int" | _filter_imgfmt
+TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
+TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base"
+_make_test_img -b "$TEST_IMG.int"
_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 020ed8e61f..2d164b6b5d 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 $size | _filter_imgfmt
+_make_test_img $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 $size | _filter_imgfmt
+ _make_test_img -o preallocation=$mode $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 0 | _filter_imgfmt
+ _make_test_img 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 2b99c9789e..4b0f810795 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" | _filter_imgfmt
-_make_test_img -b "$TEST_IMG.int" | _filter_imgfmt
+TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
+TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base"
+_make_test_img -b "$TEST_IMG.int"
# Launch QEMU with these two drives:
# none0: base (read-only)
--
2.23.0
Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Eric Blake, 2019/12/20
[PATCH 03/18] fuse: Implement standard FUSE operations, Max Reitz, 2019/12/19
[PATCH 04/18] fuse: Add fuse-export-remove, Max Reitz, 2019/12/19
[PATCH 05/18] fuse: Allow growable exports, Max Reitz, 2019/12/19
[PATCH 06/18] fuse: (Partially) implement fallocate(), Max Reitz, 2019/12/19
[PATCH 07/18] fuse: Implement hole detection through lseek, Max Reitz, 2019/12/19
[PATCH 08/18] iotests: Do not needlessly filter _make_test_img,
Max Reitz <=
[PATCH 09/18] iotests: Do not pipe _make_test_img, Max Reitz, 2019/12/19
[PATCH 10/18] iotests: Use convert -n in some cases, Max Reitz, 2019/12/19
[PATCH 11/18] iotests: Avoid renaming images, Max Reitz, 2019/12/19
[PATCH 12/18] iotests: Derive image names from $TEST_IMG, Max Reitz, 2019/12/19
[PATCH 13/18] iotests/091: Use _cleanup_qemu instad of "wait", Max Reitz, 2019/12/19
[PATCH 14/18] iotests: Restrict some Python tests to file, Max Reitz, 2019/12/19
[PATCH 15/18] iotests: Let _make_test_img guess $TEST_IMG_FILE, Max Reitz, 2019/12/19
[PATCH 16/18] iotests: Allow testing FUSE exports, Max Reitz, 2019/12/19
[PATCH 17/18] iotests: Enable fuse for many tests, Max Reitz, 2019/12/19
[PATCH 18/18] iotests/281: Add test for FUSE exports, Max Reitz, 2019/12/19