From: Jeff Cody <jcody@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] iotests: Pull _filter_actual_image_size from 67/87
Date: Mon, 9 Oct 2017 14:01:53 -0400 [thread overview]
Message-ID: <20171009180153.GI4501@localhost.localdomain> (raw)
In-Reply-To: <20171009163456.485-2-mreitz@redhat.com>
On Mon, Oct 09, 2017 at 06:34:55PM +0200, Max Reitz wrote:
> 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 <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
> ---
> 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
>
>
next prev parent reply other threads:[~2017-10-09 18:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 16:34 [Qemu-devel] [PATCH 0/2] iotests: Add _filter_actual_image_size Max Reitz
2017-10-09 16:34 ` [Qemu-devel] [PATCH 1/2] iotests: Pull _filter_actual_image_size from 67/87 Max Reitz
2017-10-09 18:01 ` Jeff Cody [this message]
2017-10-09 16:34 ` [Qemu-devel] [PATCH 2/2] iotests: Filter actual image size in 184 and 191 Max Reitz
2017-10-09 18:02 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-10-09 17:53 ` [Qemu-devel] [PATCH 0/2] iotests: Add _filter_actual_image_size Eric Blake
2017-10-09 19:55 ` Max Reitz
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=20171009180153.GI4501@localhost.localdomain \
--to=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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).