[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] block: qemu-iotests - add basic ability to
From: |
Jeff Cody |
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 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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).