From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN8x8-0004rN-O5 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 18:45:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN8x1-0006IO-V9 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 18:45:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN8x1-0006IK-9n for qemu-devel@nongnu.org; Mon, 10 Mar 2014 18:45:39 -0400 Message-ID: <531E4090.8050004@redhat.com> Date: Mon, 10 Mar 2014 16:45:36 -0600 From: Eric Blake MIME-Version: 1.0 References: <1394436721-21812-1-git-send-email-cyliu@suse.com> In-Reply-To: <1394436721-21812-1-git-send-email-cyliu@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sUbFLUkJiscMniVbPLF6Ev2J8aPaROBtK" Subject: Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chunyan Liu , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sUbFLUkJiscMniVbPLF6Ev2J8aPaROBtK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/10/2014 01:31 AM, Chunyan Liu wrote: > This patch series is to replace QEMUOptionParameter with QemuOpts, so t= hat only > one Qemu Option structure is kept in QEMU code. Uggh. The more I learn about QemuOpts while reviewing this patch, the more I KNOW it has lurking bugs waiting to bite us. Case in point: $ touch oddname,id=3D1 $ qemu-system-x86_64 -drive id=3Da,file=3Doddname,,id=3D1 # starts $ # now, swap the two arguments: $ qemu-system-x86_64 -drive file=3Doddname,,id=3D1,id=3Da qemu-system-x86_64: -drive file=3Doddname,,id=3D1,id=3Da: Parameter 'id' expects an identifier $ Gross. opts_parse uses strncmp() for checking for a leading 'id=3D', but= strstr() for checking for an intermediate ',id=3D'. And strstr() can hav= e false positives, including in the middle of my filename that was properly escaped. This is a long-standing bug - as a bug, you can fix it after freeze, but as it is long-standing, it's not the end of the world if it misses 2.0. But it underscores my plea that this series is not fully baked until you add a testsuite. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --sUbFLUkJiscMniVbPLF6Ev2J8aPaROBtK 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 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTHkCQAAoJEKeha0olJ0Nqv7QH/1vgZ9njDvIailf2oDgEDu23 XxX7KAYU+ZiOyHB+6zBuoiJusWMZfo2yJ7xksPYqBreBfM5DRn0oHVsdmJRtkG/J +CbO5bVigvZNe2pSMbtKkJnZ4Rz5IX2Jke6sjpufAv1U8AESSYETlKjjIC0d+i9E nGqDVNPVpfMKhcb2w5124SVEuIMMFSyUknP2LT4AYEvjkQOIXdY8Qdl7sEyp4phU XlAmAiZqZHvyufofJEIo/+svFpDECFLAYPCKnpSlcj22Z3b7UNLVAnmC9A/XZ4Ln +ncaYCtQO0gUmQMaUwwer3rmSBdi3RWotMQpRQ+zVtZzgZVXGXUMxsaZbSP2h0w= =4k8r -----END PGP SIGNATURE----- --sUbFLUkJiscMniVbPLF6Ev2J8aPaROBtK--