From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoFhh-00071V-Fn for qemu-devel@nongnu.org; Tue, 11 Nov 2014 12:58:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoFhc-0004J2-2s for qemu-devel@nongnu.org; Tue, 11 Nov 2014 12:58:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoFhb-0004Il-Rf for qemu-devel@nongnu.org; Tue, 11 Nov 2014 12:58:04 -0500 Message-ID: <54624E22.5060801@redhat.com> Date: Tue, 11 Nov 2014 10:57:54 -0700 From: Eric Blake MIME-Version: 1.0 References: <1415627159-15941-1-git-send-email-mreitz@redhat.com> <1415627159-15941-12-git-send-email-mreitz@redhat.com> In-Reply-To: <1415627159-15941-12-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="20mwnOxXOjGQ64XcVRWIDqWCjRErMD8bk" Subject: Re: [Qemu-devel] [PATCH 11/21] iotests: Prepare for refcount_width option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --20mwnOxXOjGQ64XcVRWIDqWCjRErMD8bk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/10/2014 06:45 AM, Max Reitz wrote: > Some tests do not work well with certain refcount widths (i.e. you > cannot create internal snapshots with refcount_width=3D1), so make thos= e > widths unsupported. >=20 > Furthermore, add another filter to _filter_img_create in common.filter > which filters out the refcount_width value. >=20 > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/007 | 4 ++++ > tests/qemu-iotests/015 | 1 + > tests/qemu-iotests/026 | 11 +++++++++++ > tests/qemu-iotests/029 | 1 + > tests/qemu-iotests/051 | 1 + > tests/qemu-iotests/058 | 1 + > tests/qemu-iotests/067 | 7 +++++++ > tests/qemu-iotests/079 | 1 + > tests/qemu-iotests/080 | 1 + > tests/qemu-iotests/089 | 7 +++++++ > tests/qemu-iotests/090 | 1 + > tests/qemu-iotests/108 | 6 ++++++ > tests/qemu-iotests/common.filter | 3 ++- > 13 files changed, 44 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/qemu-iotests/007 b/tests/qemu-iotests/007 > index fe1a743..de39d1b 100755 > --- a/tests/qemu-iotests/007 > +++ b/tests/qemu-iotests/007 > @@ -43,6 +43,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 > _supported_fmt qcow2 > _supported_proto generic > _supported_os Linux > +# refcount_width must be at least 4 bits so we can create ten internal= snapshots > +# (1 bit supports none, 2 bits support three, 4 bits support 15) Feels like an off-by-one comment. A width of 1 bit support a max refcount of 1 (therefore no snapshots), a width of 2 bits supports a max refcount of 3 (therefore 2 snapshots in addition to the original), a width of 4 bits supports a max refcount of 15 (therefore only 14 snapshot= s). > +++ b/tests/qemu-iotests/067 > @@ -35,6 +35,13 @@ status=3D1 # failure is the default! > _supported_fmt qcow2 > _supported_proto file > _supported_os Linux > +# Because this would change the output of query-block > +_unsupported_imgopts 'refcount_width=3D1[^0-9]' \ > + 'refcount_width=3D2[^0-9]' \ > + 'refcount_width=3D4[^0-9]' \ > + 'refcount_width=3D8[^0-9]' \ > + 'refcount_width=3D32[^0-9]' \ > + 'refcount_width=3D64[^0-9]' It might be more compact to exploit globbing and just say: _unsupported_imgopts 'refcount_width=3D?[^6]' which leaves refcount_width=3D16 as the only pattern that doesn't match the glob. But that feels more fragile, so I can live with your longer li= st. > +++ b/tests/qemu-iotests/089 > @@ -41,6 +41,13 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 > _supported_fmt qcow2 > _supported_proto file > _supported_os Linux > +# Because this would change the output of qemu_io -c info > +_unsupported_imgopts 'refcount_width=3D1[^0-9]' \ I like how you give reasons for some tests... > +++ b/tests/qemu-iotests/090 > @@ -41,6 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 > _supported_fmt qcow2 > _supported_proto file nfs > _supported_os Linux > +_unsupported_imgopts 'refcount_width=3D1[^0-9]' =2E..so why not do it for all tests? At any rate, the patch makes sense, so whether or not you tweak comments,= Reviewed-by: Eric Blake I'm assuming that later in the series you add a test that explicitly covers the error message given when a refcount_order=3D0 (width=3D1) imag= e is attempted to be used with snapshots, since that will fail (internal snapshots are simply not possible without a refcount that can't exceed 1)= =2E --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --20mwnOxXOjGQ64XcVRWIDqWCjRErMD8bk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUYk4iAAoJEKeha0olJ0Nqd84H/0zlr9oBPJ3nHDxu0Q2k1Bkz YvSk3rAdMfNPzjzrXKd93A0fj8CtpGeUpCXQlxk2uljLlYsGQtAkirtAx3Cc8N7t FgZW53R7JPrFIgjmj3MK7/yd8Jk9ZUlptz0YzNpzuRCZuBg1ISOws0qPbs4vEnbx IUkiG7cBkLicg2PeKlIyLtDWlNLutbgcFW93PJuEVu5nbwaVL3kqM+mf9wfsM/k/ LmfWrRRfdf7QHDiat0JmrvTlTgLme3UMlSLjmwe1J6L4ITlHg8MQFIY38CHtecLL MVfeX0+sCofOyRQztXsI7vi2nChpFz/iVEZsRzxdyB8tzM/N49eCNYr8FnVv+yw= =vNsI -----END PGP SIGNATURE----- --20mwnOxXOjGQ64XcVRWIDqWCjRErMD8bk--