From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyVFd-00065d-I0 for qemu-devel@nongnu.org; Mon, 06 Aug 2012 17:54:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyVFc-0002zz-52 for qemu-devel@nongnu.org; Mon, 06 Aug 2012 17:54:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyVFb-0002zq-T5 for qemu-devel@nongnu.org; Mon, 06 Aug 2012 17:54:12 -0400 Message-ID: <50203CFF.5000401@redhat.com> Date: Mon, 06 Aug 2012 15:54:07 -0600 From: Eric Blake MIME-Version: 1.0 References: <1344285891-6578-1-git-send-email-kwolf@redhat.com> <1344285891-6578-12-git-send-email-kwolf@redhat.com> In-Reply-To: <1344285891-6578-12-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig2D376A76CB00C102B9AB8EA3" Subject: Re: [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2D376A76CB00C102B9AB8EA3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/06/2012 02:44 PM, Kevin Wolf wrote: > qemu-iotests already filters out image creation options that may be > present or not in order to get the same output in both cases. However, > often it only considers the default value of the option. Cover all vali= d > values instead so that ./check -o name=3Dvalue can be used successfull = for > all of them. >=20 > +++ b/tests/qemu-iotests/common.rc > @@ -110,11 +110,11 @@ _make_test_img() > sed -e "s#$IMGFMT#IMGFMT#g" | \ > sed -e "s# encryption=3Doff##g" | \ > sed -e "s# cluster_size=3D[0-9]\\+##g" | \ > - sed -e "s# table_size=3D0##g" | \ > + sed -e "s# table_size=3D[0-9]\\+##g" | \ Technically, use of \+ in a sed expression is undefined by POSIX. > sed -e "s# compat=3D'[^']*'##g" | \ > - sed -e "s# compat6=3Doff##g" | \ > - sed -e "s# static=3Doff##g" | \ > - sed -e "s# lazy_refcounts=3Doff##g" > + sed -e "s# compat6=3D\\(on\\|off\\)##g" | \ Likewise for use of \(, \|, and \). If you were worried about strict POSIX compliance, you could rewrite these to use similar expressions that are limited to portable sed: sed -e "s# table_size=3D[0-9][0-9]*##g" sed -e "s# compat6=3Do[nf]*##g" (and if the difference of wiping unlikely things like compat6=3Donfnfn really matters to one of our tests, then we've got some UI to improve.) But since this is the testsuite, which will run primarily on systems with GNU sed where all four extensions are commonly present for selecting features of ERE on top of the POSIX-mandated BRE syntax used by sed, and where encountering a non-GNU sed that doesn't have the same extensions will probably result in a noisy testsuite failure rather than silent disk corruption, I'm okay overlooking this non-portable aspect for now. (Not to mention that you're not the first offender, seeing that cluster_size earlier in the context also used \+.) --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig2D376A76CB00C102B9AB8EA3 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQIDz/AAoJEKeha0olJ0NquFgH/jhgOWHK5rsBQtX6KV3S5BFN K/yJMPHuoBrGEU+7izETa/UJlsDlP+eA1zhaNRH9BZhBI2vKiC9VIMBk0IvV7Tzc 4gML+lB/PlxKBFgjSdDxBe47vBrcCTob2qadzCImeCI294tUuHxRvT+RHQHusg24 yI7GQ8POuQLIYTBt/DZCieR9JRTEfKs91gGbWDAjfkn0e9WoH8JjhvtW3f/7IlWy 0/NeeH+Oh/LjWCUI+OWkOU3qoB8kdQQ1/8fTW8l6/2RVcQNf0hGEkOLGib4taOKA CZkDyCedLlXIa3hiZ3YJ493N58GjdNRhwg9gq/5PX3IIn82lK3B6tSvngfni+/k= =dtyL -----END PGP SIGNATURE----- --------------enig2D376A76CB00C102B9AB8EA3--