From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZPOM-00012y-I1 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 16:21:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZPOL-00070q-N8 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 16:21:22 -0400 References: <1441742995-11794-1-git-send-email-mreitz@redhat.com> <1441742995-11794-3-git-send-email-mreitz@redhat.com> From: Eric Blake Message-ID: <55EF4333.3080703@redhat.com> Date: Tue, 8 Sep 2015 14:21:07 -0600 MIME-Version: 1.0 In-Reply-To: <1441742995-11794-3-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JfRpE63KCsnmAb1nJVjNr0i0TBahdDWHg" Subject: Re: [Qemu-devel] [PATCH 2/2] iotests: Add test for checking large image files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JfRpE63KCsnmAb1nJVjNr0i0TBahdDWHg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/08/2015 02:09 PM, Max Reitz wrote: > Add a test for checking a qcow2 file with a multiple of 2^32 clusters. >=20 > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/138 | 73 ++++++++++++++++++++++++++++++++++++++= ++++++++ > tests/qemu-iotests/138.out | 9 ++++++ > tests/qemu-iotests/group | 1 + > 3 files changed, 83 insertions(+) > create mode 100755 tests/qemu-iotests/138 > create mode 100644 tests/qemu-iotests/138.out >=20 > +# Put the data cluster at a multiple of 2 TB, resulting in the image a= pparently > +# having a multiple of 2^32 clusters > +# (To be more specific: It is at 32 PB) > +poke_file "$TEST_IMG" 2048 "\x80\x80\x00\x00\x00\x00\x00\x00" > + > +# An offset of 32 PB results in qemu-img check having to allocate an i= n-memory > +# refcount table of 128 TB (16 bit refcounts, 512 byte clusters). > +# This should be generally too much for any system and thus fail. > +# What this test is checking is that the qcow2 driver actually tries t= o allocate > +# such a large amount of memory (and is consequently aborting) instead= of having > +# truncated the cluster count somewhere (which would result in much le= ss memory > +# being allocated and then a segfault occuring). s/occuring/occurring/ With the typo fixed, Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JfRpE63KCsnmAb1nJVjNr0i0TBahdDWHg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV70MzAAoJEKeha0olJ0NqE3EH/134uskmoSyNmMpHWmhLKDUL X2ZM0H3hn+8QfTXkyNskpnpPf8/4/6OZ5y7TuAy06FucQ8aZNejp3ED90qWo79g4 VcxV+2jy2pOBxl/ERgt2FWmwq4z3LPMsC6F2543eMCD41EId8Qpk237MoY4syYCw mbBskzj7z9NfRhk6Tt83F8BT4Jm6oZrJmYPSoUlfjKTeHo4rhBB380IPlbp24Uv1 MWIac6ARNmfME7AJY85rxBfHUEa5UBRSz2gggJCRIg3mbGg4Fcx3uTj35VtwbD3L nfPlLvc/Ke0HKuzgbmwX2hmB/bOPqgKnZ4V5ef06LlRhHI1iiB2kB5FGam1CRno= =fRII -----END PGP SIGNATURE----- --JfRpE63KCsnmAb1nJVjNr0i0TBahdDWHg--