From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN01w-0003EN-Hx for qemu-devel@nongnu.org; Fri, 20 Sep 2013 08:41:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN01q-0001Zg-E5 for qemu-devel@nongnu.org; Fri, 20 Sep 2013 08:41:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN01q-0001ZV-4o for qemu-devel@nongnu.org; Fri, 20 Sep 2013 08:41:46 -0400 Date: Fri, 20 Sep 2013 08:41:42 -0400 From: Jeff Cody Message-ID: <20130920124142.GL15106@localhost.localdomain> References: <072dca92f6fa9125b3e8e34e07141cef06d4ff56.1379648036.git.jcody@redhat.com> <20130920123226.GD14738@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130920123226.GD14738@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] block: qemu-iotests - add basic ability to use binary sample images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@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).