qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	jcody@redhat.com, jsnow@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 10/10] iotests: 095: Use TEST_IMG override instead of "mv"
Date: Fri, 18 Dec 2015 19:18:24 +0100	[thread overview]
Message-ID: <56744DF0.80106@redhat.com> (raw)
In-Reply-To: <1450259693-25595-11-git-send-email-famz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2927 bytes --]

On 16.12.2015 10:54, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/qemu-iotests/095     | 12 ++++++------
>  tests/qemu-iotests/095.out |  8 ++++----
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095
> index 6630181..cbe61bc 100755
> --- a/tests/qemu-iotests/095
> +++ b/tests/qemu-iotests/095
> @@ -50,17 +50,16 @@ _supported_os Linux
>  size_smaller=5M
>  size_larger=100M
>  
> -_make_test_img $size_smaller
> -mv "${TEST_IMG}" "${TEST_IMG}.base"
> +TEST_IMG="$TEST_IMG.base _make_test_img $size_smaller"

I think this should be:

TEST_IMG="$TEST_IMG.base" _make_test_img $size_smaller

>  
> -_make_test_img -b "${TEST_IMG}.base" $size_larger
> -mv "${TEST_IMG}" "${TEST_IMG}.snp1"
> +TEST_IMG="$TEST_IMG.snp1 _make_test_img -b "${TEST_IMG}.base" $size_larger"

TEST_IMG="$TEST_IMG.snp1" _make_test_img -b "${TEST_IMG}.base" \
    $size_larger

(Also, you could strip the {} because the inconsistent usage looks a bit
strange inside of a single line.)

>  
>  _make_test_img -b "${TEST_IMG}.snp1" $size_larger
>  
>  echo
>  echo "=== Base image info before commit and resize ==="
> -TEST_IMG="${TEST_IMG}.base" _img_info
> +TEST_IMG="${TEST_IMG}.base" _img_info | \
> +    sed -e 's/^cluster_size: .*$/cluster_size: XXX/'

How about using _filter_img_info instead?

Max

>  echo
>  echo === Running QEMU Live Commit Test ===
> @@ -78,7 +77,8 @@ _send_qemu_cmd $h "{ 'execute': 'block-commit',
>  
>  echo
>  echo "=== Base image info after commit and resize ==="
> -TEST_IMG="${TEST_IMG}.base" _img_info
> +TEST_IMG="${TEST_IMG}.base" _img_info | \
> +    sed -e 's/^cluster_size: .*$/cluster_size: XXX/'
>  
>  # success, all done
>  echo "*** done"
> diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out
> index 2360061..b95111e 100644
> --- a/tests/qemu-iotests/095.out
> +++ b/tests/qemu-iotests/095.out
> @@ -1,13 +1,13 @@
>  QA output created by 095
> -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=5242880
> -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/t.IMGFMT.base
> +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=5242880
> +Formatting 'TEST_DIR/t.IMGFMT.snp1', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/t.IMGFMT.base
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file=TEST_DIR/t.IMGFMT.snp1
>  
>  === Base image info before commit and resize ===
>  image: TEST_DIR/t.IMGFMT.base
>  file format: IMGFMT
>  virtual size: 5.0M (5242880 bytes)
> -cluster_size: 65536
> +cluster_size: XXX
>  
>  === Running QEMU Live Commit Test ===
>  
> @@ -19,5 +19,5 @@ cluster_size: 65536
>  image: TEST_DIR/t.IMGFMT.base
>  file format: IMGFMT
>  virtual size: 100M (104857600 bytes)
> -cluster_size: 65536
> +cluster_size: XXX
>  *** done
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-12-18 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16  9:54 [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 01/10] iotests: 018: Use TEST_IMG override instead of "mv" Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 02/10] iotests: 019: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 03/10] iotests: 020: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 04/10] iotests: 024: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 05/10] iotests: 028: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 06/10] iotests: 034: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 07/10] iotests: 037: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 08/10] iotests: 038: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 09/10] iotests: 050: " Fam Zheng
2015-12-16  9:54 ` [Qemu-devel] [PATCH 10/10] iotests: 095: " Fam Zheng
2015-12-18 18:18   ` Max Reitz [this message]
2015-12-22  2:36     ` Fam Zheng
2015-12-18 18:18 ` [Qemu-devel] [PATCH 00/10] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX" 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=56744DF0.80106@redhat.com \
    --to=mreitz@redhat.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=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).