[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 30/35] iotests: Pull _filter_actual_image_size from 6
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 30/35] iotests: Pull _filter_actual_image_size from 67/87 |
Date: |
Thu, 26 Oct 2017 15:17:36 +0200 |
From: Max Reitz <address@hidden>
Tests 067 and 087 filter the actual image size because it depends on the
host filesystem (and is not part of the respective test). Since this is
generally true, we should have a common filter function for this, so
let's pull out the sed line from both tests into such a function.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/067 | 2 +-
tests/qemu-iotests/087 | 2 +-
tests/qemu-iotests/common.filter | 6 ++++++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067
index ee9595f0da..9d561ef786 100755
--- a/tests/qemu-iotests/067
+++ b/tests/qemu-iotests/067
@@ -56,7 +56,7 @@ _filter_qmp_events()
function run_qemu()
{
do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp | _filter_qemu \
- | sed -e 's/\("actual-size":\s*\)[0-9]\+/\1SIZE/g' \
+ | _filter_actual_image_size \
| _filter_generated_node_ids | _filter_qmp_events
}
diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087
index f8e4903f4f..27ab6c5151 100755
--- a/tests/qemu-iotests/087
+++ b/tests/qemu-iotests/087
@@ -46,7 +46,7 @@ function run_qemu()
{
do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp \
| _filter_qemu | _filter_imgfmt \
- | sed -e 's/\("actual-size":\s*\)[0-9]\+/\1SIZE/g'
+ | _filter_actual_image_size
}
size=128M
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 227b37e941..873ca6b104 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -105,6 +105,12 @@ _filter_block_job_len()
sed -e 's/, "len": [0-9]\+,/, "len": LEN,/g'
}
+# replace actual image size (depends on the host filesystem)
+_filter_actual_image_size()
+{
+ sed -s 's/\("actual-size":\s*\)[0-9]\+/\1SIZE/g'
+}
+
# replace driver-specific options in the "Formatting..." line
_filter_img_create()
{
--
2.13.6
- [Qemu-block] [PULL 19/35] qemu-img: Change check_empty_sectors() to byte-based, (continued)
- [Qemu-block] [PULL 19/35] qemu-img: Change check_empty_sectors() to byte-based, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 23/35] block: Align block status requests, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 24/35] block: Reduce bdrv_aligned_preadv() rounding, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 20/35] qemu-img: Change compare_sectors() to be byte-based, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 22/35] qemu-img: Change img_compare() to be byte-based, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 21/35] qemu-img: Change img_rebase() to be byte-based, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 25/35] qcow2: Reduce is_zero() rounding, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 27/35] qemu-img.1: Image invalidation on qemu-img commit, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 28/35] qcow2: Use BDRV_SECTOR_BITS instead of its literal value, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 26/35] qemu-io: Relax 'alloc' now that block-status doesn't assert, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 30/35] iotests: Pull _filter_actual_image_size from 67/87,
Kevin Wolf <=
- [Qemu-block] [PULL 31/35] iotests: Filter actual image size in 184 and 191, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 29/35] iotests: Add test for dataplane mirroring, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 32/35] qcow2: Emit errp when truncating the image tail, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 33/35] qcow2: Fix unaligned preallocated truncation, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 34/35] qcow2: Always execute preallocate() in a coroutine, Kevin Wolf, 2017/10/26
- [Qemu-block] [PULL 35/35] iotests: Add cluster_size=64k to 125, Kevin Wolf, 2017/10/26
- Re: [Qemu-block] [Qemu-devel] [PULL 00/35] Block layer patches, Peter Maydell, 2017/10/27