From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBQ0Z-0005qR-Kk for qemu-devel@nongnu.org; Thu, 06 Feb 2014 09:32:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBQ0S-0005uE-AJ for qemu-devel@nongnu.org; Thu, 06 Feb 2014 09:32:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBQ0S-0005tr-1M for qemu-devel@nongnu.org; Thu, 06 Feb 2014 09:32:44 -0500 From: Markus Armbruster Date: Thu, 6 Feb 2014 15:29:50 +0100 Message-Id: <1391697000-5855-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 00/10] qapi: Test coverage & clean up generated code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, aliguori@amazon.com 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. My last three patches clean up the generated code. Markus Armbruster (10): 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: 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 scripts/qapi-commands.py | 20 --------- scripts/qapi-visit.py | 16 +++---- tests/qapi-schema/qapi-schema-test.json | 24 +++++++++- tests/qapi-schema/qapi-schema-test.out | 19 +++++--- tests/test-qmp-commands.c | 79 +++++++++++++++++++++++++++------ 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 +++--- 9 files changed, 288 insertions(+), 65 deletions(-) -- 1.8.1.4