[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v2 00/47] qapi: QMP introspection
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH RFC v2 00/47] qapi: QMP introspection |
Date: |
Wed, 1 Jul 2015 22:21:48 +0200 |
Still RFC, because it has a couple of FIXMEs and TODOs.
* PATCH 01-19 are preliminary fixes and cleanups. Not really RFC.
* PATCH 20-38 basically replace the interemediate representation. The
replacement isn't complete, but fully functional. See PATCH 21 for
rationale and future work.
* PATCH 39-44 replace the '**' type bypass by a proper top type called
'any'.
* PATCH 45 is the introspection RFC.
* PATCH 46-47 are minor variations to hide a bit more detail from
clients.
I'm afraid the size of my series will strain reviewers. I did my
level best to split things up into reviewable pieces.
Series depends on my "[PATCH for-2.4 0/2] qom: Fix misuse of Error
API" to pass tests.
You can also fetch it from my git://repo.or.cz/qemu/armbru.git branch
qapi-introspect.
I'll be offline for two weeks starting next Monday.
Bombs away!
v2:
* Old PATCH 01-18 have been merged
* PATCH 19 exploded. Comparing against RFC v1 is almost certainly a
waste of time, except perhaps for the QAPI schema introspect.json.
The awkward alternate Value got replaced by the proper top type
'any'.
* For even more kaboom, I fixed and cleaned up along the way.
Markus Armbruster (47):
qapi: Clarify docs on including the same file multiple times
qapi: Clean up cgen() and mcgen()
qapi: Simplify guardname()
qapi-event: Clean up how name of enum QAPIEvent is made
qapi: Reject -p arguments that break qapi-event.py
qapi: Drop unused and useless parameters and variables
qapi: Generate a nicer struct for flat unions
qapi-visit: Fix generated code when schema has forward refs
qapi-visit: Replace list implicit_structs by set
qapi-visit: Fix two name arguments passed to visitors
tests/qapi-schema: Document alternate's enum lacks visit function
tests/qapi-schema: Document events with with base don't work
tests/qapi-schema: Restore test case for flat union base bug
qapi-tests: New tests for union, alternate command arguments
qapi: Fix to reject union command arguments
qapi-commands: Fix gen_err_check(e) for e and e != 'local_err'
qapi-commands: Inline gen_marshal_output_call()
qapi-commands: Don't feed output of mcgen() to mcgen() again
qapi: Generated code cleanup
qapi: Rename class QAPISchema to QAPISchemaParser
qapi: New QAPISchema intermediate reperesentation
qapi: QAPISchema code generation helper methods
qapi: New QAPISchemaVisitor
tests/qapi-schema: Convert test harness to QAPISchemaVisitor
qapi: Make generators work on sorted schema expressions
qapi-types: Convert to QAPISchemaVisitor, fixing flat unions
qapi-visit: Convert to QAPISchemaVisitor, fixing bugs
qapi-commands: Convert to QAPISchemaVisitor
qapi: Replace dirty is_c_ptr() by method c_null()
qapi: De-duplicate enum code generation
qapi-event: Eliminate global variable event_enum_value
qapi-event: Convert to QAPISchemaVisitor, fixing data with base
qapi: Clean up after recent conversions to QAPISchemaVisitor
qapi-visit: Rearrange code a bit
qapi-commands: Rearrange code
qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()
qapi: De-duplicate parameter list generation
qapi-commands: De-duplicate output marshaling functions
qapi: Improve built-in type documentation
qapi: Introduce a first class 'any' type
qom: Don't use 'gen': false for qom-get, qom-set, object-add
qapi-schema: Fix up misleading specification of netdev_add
qmp: Improve netdev_add usage example in the manual
qapi: Pseudo-type '**' is now unused, drop it
qapi: New QMP command query-schema for QMP schema introspection
qapi-introspect: Map all integer types to 'int'
qapi-introspect: Hide type names
.gitignore | 1 +
Makefile | 9 +-
Makefile.objs | 4 +-
docs/qapi-code-gen.txt | 53 +-
docs/writing-qmp-commands.txt | 8 +-
include/monitor/monitor.h | 3 -
include/qapi/visitor-impl.h | 2 +
include/qapi/visitor.h | 1 +
monitor.c | 17 +-
qapi-schema.json | 25 +-
qapi/introspect.json | 69 +++
qapi/qapi-dealloc-visitor.c | 9 +
qapi/qapi-visit-core.c | 6 +
qapi/qmp-input-visitor.c | 11 +
qapi/qmp-output-visitor.c | 9 +
qmp-commands.hx | 266 +++++----
qmp.c | 20 +-
scripts/qapi-commands.py | 355 ++++++-----
scripts/qapi-event.py | 243 +++-----
scripts/qapi-introspect.py | 189 ++++++
scripts/qapi-types.py | 378 +++++-------
scripts/qapi-visit.py | 368 +++++-------
scripts/qapi.py | 658 +++++++++++++++++----
tests/.gitignore | 1 +
tests/Makefile | 15 +-
tests/qapi-schema/alternate-good.out | 16 +-
tests/qapi-schema/args-alternate.err | 1 +
...type-bypass-no-gen.exit => args-alternate.exit} | 0
tests/qapi-schema/args-alternate.json | 4 +
.../{type-bypass-no-gen.out => args-alternate.out} | 0
tests/qapi-schema/args-returns-any.err | 1 +
tests/qapi-schema/args-returns-any.exit | 1 +
tests/qapi-schema/args-returns-any.json | 6 +
.../{type-bypass.err => args-returns-any.out} | 0
tests/qapi-schema/args-union.err | 1 +
tests/qapi-schema/args-union.exit | 1 +
tests/qapi-schema/args-union.json | 4 +
tests/qapi-schema/args-union.out | 0
tests/qapi-schema/comments.out | 5 +-
tests/qapi-schema/data-member-array.out | 14 +-
tests/qapi-schema/empty.out | 4 +-
tests/qapi-schema/enum-empty.out | 5 +-
tests/qapi-schema/event-case.out | 5 +-
tests/qapi-schema/flat-union-base-star.err | 2 +-
tests/qapi-schema/flat-union-base-star.json | 2 +-
tests/qapi-schema/flat-union-reverse-define.out | 22 +-
tests/qapi-schema/ident-with-escape.out | 8 +-
tests/qapi-schema/include-relpath.out | 5 +-
tests/qapi-schema/include-repetition.out | 5 +-
tests/qapi-schema/include-simple.out | 5 +-
tests/qapi-schema/indented-expr.out | 8 +-
tests/qapi-schema/qapi-schema-test.json | 33 +-
tests/qapi-schema/qapi-schema-test.out | 187 ++++--
tests/qapi-schema/returns-int.out | 6 +-
tests/qapi-schema/test-qapi.py | 37 +-
tests/qapi-schema/type-bypass-no-gen.err | 1 -
tests/qapi-schema/type-bypass-no-gen.json | 2 -
tests/qapi-schema/type-bypass.exit | 1 -
tests/qapi-schema/type-bypass.json | 2 -
tests/qapi-schema/type-bypass.out | 3 -
tests/test-qmp-event.c | 2 +-
tests/test-qmp-input-strict.c | 2 +-
tests/test-qmp-input-visitor.c | 82 ++-
tests/test-qmp-output-visitor.c | 55 +-
64 files changed, 2011 insertions(+), 1247 deletions(-)
create mode 100644 qapi/introspect.json
create mode 100644 scripts/qapi-introspect.py
create mode 100644 tests/qapi-schema/args-alternate.err
rename tests/qapi-schema/{type-bypass-no-gen.exit => args-alternate.exit}
(100%)
create mode 100644 tests/qapi-schema/args-alternate.json
rename tests/qapi-schema/{type-bypass-no-gen.out => args-alternate.out} (100%)
create mode 100644 tests/qapi-schema/args-returns-any.err
create mode 100644 tests/qapi-schema/args-returns-any.exit
create mode 100644 tests/qapi-schema/args-returns-any.json
rename tests/qapi-schema/{type-bypass.err => args-returns-any.out} (100%)
create mode 100644 tests/qapi-schema/args-union.err
create mode 100644 tests/qapi-schema/args-union.exit
create mode 100644 tests/qapi-schema/args-union.json
create mode 100644 tests/qapi-schema/args-union.out
delete mode 100644 tests/qapi-schema/type-bypass-no-gen.err
delete mode 100644 tests/qapi-schema/type-bypass-no-gen.json
delete mode 100644 tests/qapi-schema/type-bypass.exit
delete mode 100644 tests/qapi-schema/type-bypass.json
delete mode 100644 tests/qapi-schema/type-bypass.out
--
1.9.3
- [Qemu-devel] [PATCH RFC v2 00/47] qapi: QMP introspection,
Markus Armbruster <=