From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDwYB-0000Vj-TL for qemu-devel@nongnu.org; Thu, 13 Feb 2014 08:42:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDwY7-0006cH-9p for qemu-devel@nongnu.org; Thu, 13 Feb 2014 08:41:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDwY7-0006cD-2C for qemu-devel@nongnu.org; Thu, 13 Feb 2014 08:41:55 -0500 Date: Thu, 13 Feb 2014 08:41:48 -0500 From: Luiz Capitulino Message-ID: <20140213084148.699c17ca@redhat.com> In-Reply-To: <52FC90E5.1030204@redhat.com> References: <1392042045-31525-1-git-send-email-armbru@redhat.com> <52FC90E5.1030204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 00/13] qapi: Test coverage & clean up generated code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, Markus Armbruster , aliguori@amazon.com On Thu, 13 Feb 2014 10:31:17 +0100 Paolo Bonzini wrote: > Il 10/02/2014 15:20, Markus Armbruster ha scritto: > > Coverity is unhappy with the generated code. Nothing serious, just > > heaps of valid DEADCODE defects topped off with a few bogus > > FORWARD_NULL defects. > > > > I had a look at the generator, and decided I don't want to mess with > > it without decent test coverage. Unfortunately, a few features have > > been added without tests. My first seven patches make the tests catch > > up. tests/qapi-schema/qapi-schema-test.json now covers all mcgen() in > > scripts/qapi*.py, except for a few in qapi-commands.py that are > > conditional on -m. > > > > The next four patches clean up the generated code. > > > > I also reviewed null checks in visitor implementations. The final two > > patches address the issues I found there. > > > > v2: > > * Previously separate patch "qapi: Fix licensing of scripts" revised > > and included as "[PATCH v2 08/13] qapi: Fix licensing of scripts" > > * Style cleanups > > * New PATCH 12/13 and 13/13 > > > > Markus Armbruster (13): > > tests/qapi-schema: Actually check successful QMP command response > > tests/qapi-schema: Cover optional command arguments > > tests/qapi-schema: Cover simple argument types > > tests/qapi-schema: Cover anonymous union types > > tests/qapi-schema: Cover complex types with base > > tests/qapi-schema: Cover union types with base > > tests/qapi-schema: Cover flat union types > > qapi: Fix licensing of scripts > > qapi: Drop nonsensical header guard in generated qapi-visit.c > > qapi: Drop unused code in qapi-commands.py > > qapi: Clean up null checking in generated visitors > > qapi: Clean up superfluous null check in qapi_dealloc_type_str() > > qapi: Add missing null check to opts_start_struct() > > > > qapi/opts-visitor.c | 4 +- > > qapi/qapi-dealloc-visitor.c | 4 +- > > scripts/qapi-commands.py | 24 +--------- > > scripts/qapi-types.py | 4 +- > > scripts/qapi-visit.py | 20 ++++----- > > scripts/qapi.py | 4 +- > > tests/qapi-schema/qapi-schema-test.json | 24 +++++++++- > > tests/qapi-schema/qapi-schema-test.out | 19 +++++--- > > tests/test-qmp-commands.c | 78 +++++++++++++++++++++++++++------ > > tests/test-qmp-input-strict.c | 69 ++++++++++++++++++++++++++++- > > tests/test-qmp-input-visitor.c | 45 +++++++++++++++++-- > > tests/test-qmp-output-visitor.c | 67 ++++++++++++++++++++++++++-- > > tests/test-visitor-serialization.c | 14 +++--- > > 13 files changed, 299 insertions(+), 77 deletions(-) > > > > Thanks Markus! > > Luiz, should this go in through your tree? It could. Markus, what's your plan for this series? Is anyone going to pick it up?