Received: from eggs.gnu.org ([208.118.235.92]:35584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US1db-000404-Ub for qemu-devel@nongnu.org; Tue, 16 Apr 2013 04:53:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US1da-0006sM-Ns for qemu-devel@nongnu.org; Tue, 16 Apr 2013 04:53:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US1da-0006s4-Ep for qemu-devel@nongnu.org; Tue, 16 Apr 2013 04:53:14 -0400 Date: Tue, 16 Apr 2013 10:53:06 +0200 From: Kevin Wolf Message-ID: <20130416085306.GC2825@dhcp-200-207.str.redhat.com> References: <1366039054-32536-1-git-send-email-stefanha@redhat.com> <1366039054-32536-5-git-send-email-stefanha@redhat.com> <516C1EF4.4010903@redhat.com> <20130416083645.GF6308@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130416083645.GF6308@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-iotests: add 053 unaligned compressed image size test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi , Ilkka Tengvall Am 16.04.2013 um 10:36 hat Stefan Hajnoczi geschrieben: > 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 > > > --- > > > > > +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. Maybe just qemu-img compare -s both images? And you can add the info as well just in case that compare is broken... Kevin