Received: from eggs.gnu.org ([208.118.235.92]:59088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US1Ni-0004rM-Ug for qemu-devel@nongnu.org; Tue, 16 Apr 2013 04:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US1Nh-0000m5-6V for qemu-devel@nongnu.org; Tue, 16 Apr 2013 04:36:50 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:52058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US1Ng-0000lj-SX for qemu-devel@nongnu.org; Tue, 16 Apr 2013 04:36:49 -0400 Received: by mail-wi0-f182.google.com with SMTP id m6so200127wiv.9 for ; Tue, 16 Apr 2013 01:36:48 -0700 (PDT) Date: Tue, 16 Apr 2013 10:36:45 +0200 From: Stefan Hajnoczi Message-ID: <20130416083645.GF6308@stefanha-thinkpad.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <516C1EF4.4010903@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: Eric Blake Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi , Ilkka Tengvall 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. Stefan