All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 00/13] qapi: Test coverage & clean up generated code
@ 2014-03-01  7:40 Markus Armbruster
  2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 01/13] tests/qapi-schema: Actually check successful QMP command response Markus Armbruster
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: Markus Armbruster @ 2014-03-01  7:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, mdroth, lcapitulino, aliguori, pbonzini

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.

v3:
* Trivially rebased

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(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-03-03 16:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-01  7:40 [Qemu-devel] [PATCH v3 00/13] qapi: Test coverage & clean up generated code Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 01/13] tests/qapi-schema: Actually check successful QMP command response Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 02/13] tests/qapi-schema: Cover optional command arguments Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 03/13] tests/qapi-schema: Cover simple argument types Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 04/13] tests/qapi-schema: Cover anonymous union types Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 05/13] tests/qapi-schema: Cover complex types with base Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 06/13] tests/qapi-schema: Cover union " Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 07/13] tests/qapi-schema: Cover flat union types Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 08/13] qapi: Fix licensing of scripts Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 09/13] qapi: Drop nonsensical header guard in generated qapi-visit.c Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 10/13] qapi: Drop unused code in qapi-commands.py Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 11/13] qapi: Clean up null checking in generated visitors Markus Armbruster
2014-03-01 13:38   ` Eric Blake
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 12/13] qapi: Clean up superfluous null check in qapi_dealloc_type_str() Markus Armbruster
2014-03-01  7:40 ` [Qemu-devel] [PATCH v3 13/13] qapi: Add missing null check to opts_start_struct() Markus Armbruster
2014-03-03 16:21 ` [Qemu-devel] [PATCH v3 00/13] qapi: Test coverage & clean up generated code Luiz Capitulino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.