From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlqkm-0004qc-Uy for qemu-devel@nongnu.org; Tue, 04 Nov 2014 21:55:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlqki-0001cc-DF for qemu-devel@nongnu.org; Tue, 04 Nov 2014 21:55:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlqki-0001cL-5v for qemu-devel@nongnu.org; Tue, 04 Nov 2014 21:55:20 -0500 Date: Tue, 4 Nov 2014 21:55:11 -0500 From: Jeff Cody Message-ID: <20141105025511.GL26767@localhost.localdomain> References: <1414589891-32736-1-git-send-email-den@openvz.org> <1414589891-32736-6-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1414589891-32736-6-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 5/6] iotests: padded parallels image test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On Wed, Oct 29, 2014 at 04:38:10PM +0300, Denis V. Lunev wrote: > Unfortunately, old guest OSes do not align partitions to page size by > default. This is true for Windows 2003 and Windows XP. > > "Padding" is a value which should be added to guest LBA to obtain > sector number inside the image. This results in a shifted images. > 0123 offset inside image (in 512 byte sectors) > +------- > +.012 guest data (512 byte sectors) > +------- > The information about this is available in DiskDescriptor.xml ONLY. There > is no such data in the image header. > > This patch contains very simple image with padding and corresponding > XML disk descriptor created in authentic way. > > Signed-off-by: Denis V. Lunev > Acked-by: Roman Kagan > CC: Jeff Cody > CC: Kevin Wolf > CC: Stefan Hajnoczi > --- > tests/qemu-iotests/076 | 6 ++++++ > tests/qemu-iotests/076.out | 4 ++++ > tests/qemu-iotests/sample_images/parallels-padded.xml.bz2 | Bin 0 -> 377 bytes > tests/qemu-iotests/sample_images/parallels-v2-padded.bz2 | Bin 0 -> 139 bytes > 4 files changed, 10 insertions(+) > create mode 100644 tests/qemu-iotests/sample_images/parallels-padded.xml.bz2 > create mode 100644 tests/qemu-iotests/sample_images/parallels-v2-padded.bz2 > > diff --git a/tests/qemu-iotests/076 b/tests/qemu-iotests/076 > index 242d0c3..c83b953 100755 > --- a/tests/qemu-iotests/076 > +++ b/tests/qemu-iotests/076 > @@ -81,6 +81,12 @@ _use_sample_img parallels-v2.bz2 > _use_sample_img parallels-simple.xml.bz2 > { $QEMU_IO -c "read -P 0x11 0 64k" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir > > +echo > +echo "== Read from a valid v2 image opened through xml with padding ==" > +_use_sample_img parallels-v2-padded.bz2 > +_use_sample_img parallels-padded.xml.bz2 > +{ $QEMU_IO -c "read -P 0x11 0 64k" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir > + Same comment as before on $TEST_IMG needing quoting, and as before, can wait until we clean up the other instances in this same file. Reviewed-by: Jeff Cody > # success, all done > echo "*** done" > rm -f $seq.full > diff --git a/tests/qemu-iotests/076.out b/tests/qemu-iotests/076.out > index 628d9bf..46680d8 100644 > --- a/tests/qemu-iotests/076.out > +++ b/tests/qemu-iotests/076.out > @@ -23,4 +23,8 @@ read 65536/65536 bytes at offset 0 > == Read from a valid v2 image opened through xml == > read 65536/65536 bytes at offset 0 > 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > + > +== Read from a valid v2 image opened through xml with padding == > +read 65536/65536 bytes at offset 0 > +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > *** done > diff --git a/tests/qemu-iotests/sample_images/parallels-padded.xml.bz2 b/tests/qemu-iotests/sample_images/parallels-padded.xml.bz2 > new file mode 100644 > index 0000000000000000000000000000000000000000..90e481b88e1f4d65256d0511a8509114c6358052 > GIT binary patch > literal 377 > zcmV-<0fzoUT4*^jL0KkKS+JP`&Hw z0kr@C000`P{z){A0000Upa9SS5-9{U$c>4nhyVtdfq>MRN`P%Vs7e5mydg1cvP<`s > zYo%7Ss&>_C5i%-bDqP)#HmEBiP+TU)8WyoiurHMw!l_ZF1>8_3m3N^^QwEd8=8hkN > zLO3;VtVoT0C3B518KN#oIV4@)7DfOSbkchYBQVO$9`K;#(G?m(FfikRxR&q(!eB`z > zPfQaAWzYbTAj%3PZH#S=y0Cm|7Ih97TD6vNg%Klm)F8;i7;OxS)eka > zB8A?w-Lb zUDR|Oi30I4$}VPcTnCQ(CKJjW0g+;mFwDaQlohzp(E|mg47s2j;G&NR^b?hm3@s%x > XY}H|5IAssg=l(9_ig2MJVKN1r8+(|= > > literal 0 > HcmV?d00001 > > diff --git a/tests/qemu-iotests/sample_images/parallels-v2-padded.bz2 b/tests/qemu-iotests/sample_images/parallels-v2-padded.bz2 > new file mode 100644 > index 0000000000000000000000000000000000000000..80948ce689e2c5c2335d6e6b36965fe0b2305613 > GIT binary patch > literal 139 > zcmV;60CfLCT4*^jL0KkKSt&WeumB1p|H%DFU;t162mk{B2!JYJ)<8f2AOHXuAOMPl > zQl^8-X^;SIHmDUv6HN?Ehp1#2<6B`Us=32n6t4O~g)zWI0C`4`x5NN3Kna)uT+{)Q > t08GFDLI4D2paA;UwRX=_?uTcBnnP&Yyj78F)siB > > literal 0 > HcmV?d00001 > > -- > 1.9.1 >