Received: from eggs.gnu.org ([2001:4830:134:3::10]:36691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZjBc-0004Wo-7H for qemu-devel@nongnu.org; Thu, 02 Oct 2014 12:25:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZjBW-00062m-1q for qemu-devel@nongnu.org; Thu, 02 Oct 2014 12:25:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZjBV-00062i-P2 for qemu-devel@nongnu.org; Thu, 02 Oct 2014 12:24:53 -0400 From: Markus Armbruster References: <1412261496-24455-1-git-send-email-armbru@redhat.com> <1412261496-24455-3-git-send-email-armbru@redhat.com> <542D6E2A.6070301@redhat.com> Date: Thu, 02 Oct 2014 18:24:49 +0200 In-Reply-To: <542D6E2A.6070301@redhat.com> (Eric Blake's message of "Thu, 02 Oct 2014 09:24:26 -0600") Message-ID: <87oatu4ey6.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/6] blockdev-test: Use single rather than double quotes in QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, Anthony Liguori Eric Blake writes: > On 10/02/2014 08:51 AM, Markus Armbruster wrote: >> QMP accepts both single and double quotes. This is the only test >> using double quotes. They need to be quoted in C strings. Replace >> them by single quotes. > > Ooh, the use of single quotes on input is undocumented, and a violation > of JSON. We always output double quotes, and I've been relying on > .json/.hx files using single quotes for QAPI vs. double quotes for QMP > examples. What would break if we tightened up our input parser to > forbid non-JSON inputs and mandate that QMP use double quotes, bringing > us into compliance with our docs (docs/qmp/README)? A whole bunch of tests. Easily fixable. No telling what out-of-tree stuff breaks. Maybe even nothing. Perhaps Anthony (cc'ed) can advise. >> Signed-off-by: Markus Armbruster >> --- >> tests/drive_del-test.c | 32 ++++++++++++++++---------------- >> 1 file changed, 16 insertions(+), 16 deletions(-) > > If we WANT to keep undocumented support for single quotes (and/or > document our extension to JSON), then this is fine; otherwise, I'd > prefer that we use double quotes in QMP. > > But if we decide single quotes are tolerable, > > Reviewed-by: Eric Blake Thanks!