Received: from eggs.gnu.org ([2001:4830:134:3::10]:33330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpKPw-0006TF-CW for qemu-devel@nongnu.org; Mon, 04 May 2015 13:44:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpKPs-0004ZU-D4 for qemu-devel@nongnu.org; Mon, 04 May 2015 13:44:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpKPs-0004ZQ-6V for qemu-devel@nongnu.org; Mon, 04 May 2015 13:44:28 -0400 From: Markus Armbruster References: <1430751937-17523-1-git-send-email-eblake@redhat.com> <1430751937-17523-23-git-send-email-eblake@redhat.com> Date: Mon, 04 May 2015 19:42:59 +0200 In-Reply-To: <1430751937-17523-23-git-send-email-eblake@redhat.com> (Eric Blake's message of "Mon, 4 May 2015 09:05:19 -0600") Message-ID: <871tiw5jdo.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v8 22/40] qapi: Unify type bypass and add tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, berto@igalia.com, qemu-devel@nongnu.org Eric Blake writes: > For a few QMP commands, we are forced to pass an arbitrary type > without tracking it properly in QAPI. Among the existing clients, > this unnamed type was spelled 'dict', 'visitor', and '**'; this > patch standardizes on '**', matching the documentation changes > earlier in the series. > > Meanwhile, for the 'gen' key, we have been ignoring the value, > although the schema consistently used "'no'" ('success-response' > was hard-coded to checking for 'no'). But now that we can support > a literal "false" in the schema, we might as well use that rather > than ignoring the value or special-casing a random string. Note > that these are one-way switches (use of 'gen':true is not the same > as omitting 'gen'). Also, the use of '**' requires 'gen':false, > but the use of 'gen':false does not mandate the use of '**'. > > There is no difference to the generated code. Add some tests on > what we'd like to guarantee, although it will take later patches > to clean up test results and actually enforce the use of a bool > parameter. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster