qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/4] qemu-iotests: add 053 unaligned compressed


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-iotests: add 053 unaligned compressed image size test
Date: Tue, 16 Apr 2013 10:36:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Apr 15, 2013 at 09:38:28AM -0600, Eric Blake wrote:
> On 04/15/2013 09:17 AM, Stefan Hajnoczi wrote:
> > Test that qemu-img convert -c works when input image length is not a
> > multiple of the cluster size.
> > 
> > Previously an error message would be produced:
> > 
> >   qemu-img: error while compressing sector 0: Input/output error
> > 
> > Now that qcow2 and qcow handle this case the test passes successfully.
> > 
> > Signed-off-by: Stefan Hajnoczi <address@hidden>
> > ---
> 
> > +echo
> > +echo "== Creating single sector image =="
> > +
> > +_make_test_img 512
> > +$QEMU_IO -c "write -P0xa 0 512" $TEST_IMG | _filter_qemu_io
> > +mv $TEST_IMG $TEST_IMG.orig
> > +
> > +echo
> > +echo "== Converting the image, compressed =="
> > +
> > +$QEMU_IMG convert -c -O $IMGFMT $TEST_IMG.orig $TEST_IMG
> > +_check_test_img
> > +
> > +# success, all done
> 
> Is it worth also testing that qemu-img info on the converted image still
> reports that the guest sees a size of 512, to prove that the virtual
> size was not expanded as a result of compression tail padding?

Good point.  Let's beef up the test case.  We can also read the first
sector to verify to still contains 0xa bytes.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]