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.