qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] block: qemu-iotests - add basic ability to use binary sample images
Date: Fri, 20 Sep 2013 08:41:42 -0400	[thread overview]
Message-ID: <20130920124142.GL15106@localhost.localdomain> (raw)
In-Reply-To: <20130920123226.GD14738@stefanha-thinkpad.redhat.com>

On Fri, Sep 20, 2013 at 02:32:26PM +0200, Stefan Hajnoczi wrote:
> On Thu, Sep 19, 2013 at 11:48:42PM -0400, Jeff Cody wrote:
> > For image formats that are not "QEMU native", but supported for
> > compatibility, it is useful to verify that an image created with
> > the 'gold standard' native tool can be read / written to successfully
> > by QEMU.
> > 
> > In addition to testing non-native images, this could also be useful to
> > test against image files created by older versions of QEMU.
> > 
> > This provides a directory to store small sample images, for use by
> > scripts in tests/qemu-iotests.
> > 
> > The MANIFEST file should be updated when a new image is added to the
> > directory, to give some idea about the nature of the image and the
> > data store therein.
> 
> I'd drop the MANIFEST because metadata tends to get out-of-sync or is
> ignored.  The MANIFEST file can cause patch conflicts.  Test code or the
> commit message can describe the contents of the image so I don't see the
> need to create another copy of this information.
>

OK, good point.

> > diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> > index 28b39e4..d52f344 100644
> > --- a/tests/qemu-iotests/common.rc
> > +++ b/tests/qemu-iotests/common.rc
> > @@ -91,6 +91,14 @@ _set_default_imgopts()
> >      fi
> >  }
> >  
> > +_use_sample_img()
> > +{
> > +    cp $SAMPLE_IMG_DIR/"$1" $TEST_DIR
> > +    bunzip2 $TEST_DIR/"$1"
> 
> bzcat?  It eliminates the temporary copy.
> 

Sure

> > @@ -158,6 +166,7 @@ _cleanup_test_img()
> >              rm -f $TEST_DIR/t.$IMGFMT
> >              rm -f $TEST_DIR/t.$IMGFMT.orig
> >              rm -f $TEST_DIR/t.$IMGFMT.base
> > +            rm -f $TEST_DIR/$SAMPLE_IMG_FILE
> 
> It seems that qemu-iotests doesn't care for paths with spaces.

For v2, I'll go through all the scripts (I think TEST_DIR is used in
some of the 0?? scripts as well) and make sure it is quoted (along
with SAMPLE_IMG_DIR).

  reply	other threads:[~2013-09-20 12:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20  3:48 [Qemu-devel] [PATCH 0/2] qemu-iotests with sample images, vhdx read test Jeff Cody
2013-09-20  3:48 ` [Qemu-devel] [PATCH 1/2] block: qemu-iotests - add basic ability to use binary sample images Jeff Cody
2013-09-20 12:32   ` Stefan Hajnoczi
2013-09-20 12:41     ` Jeff Cody [this message]
2013-09-20 12:46   ` Eric Blake
2013-09-20 13:23     ` Jeff Cody
2013-09-20  3:48 ` [Qemu-devel] [PATCH 2/2] block: qemu-iotests for vhdx, read sample dynamic image Jeff Cody
2013-09-20  9:10   ` [Qemu-devel] [PATCH 2/2] block: qemu-iotests for vhdx, read sample dynamic imagee Alex Bennée
2013-09-20  9:18     ` Kevin Wolf
2013-09-20 10:54       ` Alex Bennée
2013-09-20 11:24       ` Jeff Cody

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=20130920124142.GL15106@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --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 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).