From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMzt0-0000KH-Kq for qemu-devel@nongnu.org; Fri, 20 Sep 2013 08:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMzss-0006OT-4F for qemu-devel@nongnu.org; Fri, 20 Sep 2013 08:32:38 -0400 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:40386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMzsr-0006O4-Tg for qemu-devel@nongnu.org; Fri, 20 Sep 2013 08:32:30 -0400 Received: by mail-ee0-f48.google.com with SMTP id l10so225584eei.7 for ; Fri, 20 Sep 2013 05:32:29 -0700 (PDT) Date: Fri, 20 Sep 2013 14:32:26 +0200 From: Stefan Hajnoczi Message-ID: <20130920123226.GD14738@stefanha-thinkpad.redhat.com> References: <072dca92f6fa9125b3e8e34e07141cef06d4ff56.1379648036.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <072dca92f6fa9125b3e8e34e07141cef06d4ff56.1379648036.git.jcody@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: Jeff Cody Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 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. > 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. > @@ -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.