RFC post-introspection qapi cleanups
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 RFC Latest20 patches 0 repliesNew
- v2 RFC12 patches 2 repliesSuperseded
- v11 patch 1 replySuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | qapi: use 'type' in generated C code to match QMP union wire formblock/ block/ blockdev.c +26 more | +90 | 0 replies | |
| 2/20 | vnc: hoist allocation of VncBasicInfo to callersui/ | +28 | 0 replies | |
| 3/20 | qapi: Unbox base membershmp.c scripts/ scripts/ +7 more | +65 | 0 replies | |
| 4/20 | qapi-visit: Remove redundant functions for flat union basescripts/ | +18 | 0 replies | |
| 5/20 | qapi: Test use of 'number' within alternatestests/ tests/ tests/ | +158 | 0 replies | |
| 6/20 | qapi: Simplify visiting of alternate typesdocs/ include/ include/ +9 more | +61 | 0 replies | |
| 7/20 | qapi: Fix alternates that accept 'number' but not 'int'include/ include/ qapi/ +3 more | +21 | 0 replies | |
| 8/20 | qapi: Don't pass pre-existing error to later callscripts/ | +7 | 0 replies | |
| 9/20 | qapi: Use consistent generated code patternsscripts/ | +27 | 0 replies | |
| 10/20 | qapi: Add tests for empty unionstests/ tests/ tests/ +12 more | +27 | 0 replies | |
| 11/20 | qapi: Rework deallocation of partial structinclude/ include/ qapi/ +2 more | +3 | 0 replies | |
| 12/20 | qapi: Avoid use of 'data' member of qapi unionsblockdev.c ui/ | +13 | 0 replies | |
| 13/20 | qapi: Forbid empty unions and useless alternatesdocs/ scripts/ tests/ +11 more | +26 | 0 replies | |
| 14/20 | qapi: Drop useless 'data' member of unionsscripts/ tests/ tests/ | +3 | 0 replies | |
| 15/20 | qapi: Remove dead visitor codeinclude/ include/ qapi/ | +56 | 0 replies | |
| 16/20 | qapi: Document visitor interfacesinclude/ include/ | +213 | 0 replies | |
| 17/20 | qapi: Change visit_type_XXX() to no longer return partial objectsinclude/ qapi/ scripts/ +1 more | +68 | 0 replies | |
| 18/20 | qapi: Plumb in 'box' to qapi generator lower levelsscripts/ scripts/ scripts/ +8 more | +139 | 0 replies | |
| 19/20 | qapi: Implement boxed structs for commands/eventsdocs/ scripts/ scripts/ +4 more | +65 | 0 replies | |
| 20/20 | qapi: Support boxed unionsscripts/ tests/ tests/ +16 more | +41 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [Qemu-devel] [PATCH RFC v3 00/20] post-introspection qapi cleanups
Still RFC because it depends on Markus' RFC v3:
https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00426.html
v1 was here:
https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05266.html
https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05325.html
In v2:
https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00900.html
rebase to Markus' v3 series
rework how comments are emitted for fields inherited from base additional patches added for deleting colliding 'void *data' documentation updates to match code changes
In v3:
redo cleanup of dealloc of partial struct
add patches to make all visit_type_*() avoid leaks on failure add patches to allow boxed command arguments and events
Eric Blake (20):
qapi: use 'type' in generated C code to match QMP union wire form
vnc: hoist allocation of VncBasicInfo to callers
qapi: Unbox base members
qapi-visit: Remove redundant functions for flat union base
qapi: Test use of 'number' within alternates
qapi: Simplify visiting of alternate types
qapi: Fix alternates that accept 'number' but not 'int'
qapi: Don't pass pre-existing error to later call
qapi: Use consistent generated code patterns
qapi: Add tests for empty unions
qapi: Rework deallocation of partial struct
qapi: Avoid use of 'data' member of qapi unions
qapi: Forbid empty unions and useless alternates
qapi: Drop useless 'data' member of unions
qapi: Remove dead visitor code
qapi: Document visitor interfaces
qapi: Change visit_type_XXX() to no longer return partial objects
qapi: Plumb in 'box' to qapi generator lower levels
qapi: Implement boxed structs for commands/events
qapi: Support boxed unions
block/qcow2.c | 2 +- block/vmdk.c | 2 +- blockdev.c | 34 ++--- docs/qapi-code-gen.txt | 47 ++++--- hmp.c | 18 +-- hw/input/hid.c | 2 +- hw/input/ps2.c | 2 +- hw/input/virtio-input-hid.c | 2 +- hw/mem/pc-dimm.c | 2 +- include/qapi/visitor-impl.h | 55 +++++--- include/qapi/visitor.h | 214 ++++++++++++++++++++++++++++--- net/dump.c | 2 +- net/hub.c | 2 +- net/l2tpv3.c | 2 +- net/net.c | 20 +-- net/slirp.c | 2 +- net/socket.c | 2 +- net/tap.c | 4 +- net/vhost-user.c | 2 +- numa.c | 4 +- qapi/qapi-dealloc-visitor.c | 26 ---- qapi/qapi-visit-core.c | 158 +++++++++-------------- qapi/qmp-input-visitor.c | 8 +- qemu-char.c | 24 ++-- scripts/qapi-commands.py | 101 +++++++++------ scripts/qapi-event.py | 76 ++++++----- scripts/qapi-introspect.py | 4 +- scripts/qapi-types.py | 75 +++-------- scripts/qapi-visit.py | 159 +++++++++++++---------- scripts/qapi.py | 109 +++++++++++----- tests/Makefile | 5 +- tests/qapi-schema/alternate-empty.err | 1 + tests/qapi-schema/alternate-empty.exit | 1 + tests/qapi-schema/alternate-empty.json | 2 + tests/qapi-schema/alternate-empty.out | 0 tests/qapi-schema/alternate-good.out | 1 - tests/qapi-schema/alternate-nested.json | 2 +- tests/qapi-schema/alternate-unknown.json | 2 +- tests/qapi-schema/args-bad-box.err | 1 + tests/qapi-schema/args-bad-box.exit | 1 + tests/qapi-schema/args-bad-box.json | 2 + tests/qapi-schema/args-bad-box.out | 0 tests/qapi-schema/args-box-anon.err | 1 + tests/qapi-schema/args-box-anon.exit | 1 + tests/qapi-schema/args-box-anon.json | 2 + tests/qapi-schema/args-box-anon.out | 0 tests/qapi-schema/args-box-empty.err | 1 + tests/qapi-schema/args-box-empty.exit | 1 + tests/qapi-schema/args-box-empty.json | 2 + tests/qapi-schema/args-box-empty.out | 0 tests/qapi-schema/args-member-array.out | 2 +- tests/qapi-schema/args-union.err | 2 +- tests/qapi-schema/args-union.json | 3 +- tests/qapi-schema/event-case.out | 1 + tests/qapi-schema/flat-union-empty.err | 1 + tests/qapi-schema/flat-union-empty.exit | 1 + tests/qapi-schema/flat-union-empty.json | 4 + tests/qapi-schema/flat-union-empty.out | 0 tests/qapi-schema/ident-with-escape.out | 2 +- tests/qapi-schema/indented-expr.out | 4 +- tests/qapi-schema/qapi-schema-test.json | 15 ++- tests/qapi-schema/qapi-schema-test.out | 47 +++++-- tests/qapi-schema/returns-int.out | 2 +- tests/qapi-schema/test-qapi.py | 8 +- tests/qapi-schema/union-empty.err | 1 + tests/qapi-schema/union-empty.exit | 1 + tests/qapi-schema/union-empty.json | 2 + tests/qapi-schema/union-empty.out | 0 tests/test-qmp-commands.c | 40 +++--- tests/test-qmp-event.c | 8 +- tests/test-qmp-input-visitor.c | 140 ++++++++++++++++++-- tests/test-qmp-output-visitor.c | 39 +++--- tests/test-visitor-serialization.c | 14 +- tpm.c | 2 +- ui/input-keymap.c | 10 +- ui/input-legacy.c | 2 +- ui/input.c | 24 ++-- ui/spice-core.c | 23 ++-- ui/vnc.c | 64 ++++----- util/qemu-sockets.c | 12 +- 80 files changed, 1034 insertions(+), 626 deletions(-) create mode 100644 tests/qapi-schema/alternate-empty.err create mode 100644 tests/qapi-schema/alternate-empty.exit create mode 100644 tests/qapi-schema/alternate-empty.json create mode 100644 tests/qapi-schema/alternate-empty.out create mode 100644 tests/qapi-schema/args-bad-box.err create mode 100644 tests/qapi-schema/args-bad-box.exit create mode 100644 tests/qapi-schema/args-bad-box.json create mode 100644 tests/qapi-schema/args-bad-box.out create mode 100644 tests/qapi-schema/args-box-anon.err create mode 100644 tests/qapi-schema/args-box-anon.exit create mode 100644 tests/qapi-schema/args-box-anon.json create mode 100644 tests/qapi-schema/args-box-anon.out create mode 100644 tests/qapi-schema/args-box-empty.err create mode 100644 tests/qapi-schema/args-box-empty.exit create mode 100644 tests/qapi-schema/args-box-empty.json create mode 100644 tests/qapi-schema/args-box-empty.out create mode 100644 tests/qapi-schema/flat-union-empty.err create mode 100644 tests/qapi-schema/flat-union-empty.exit create mode 100644 tests/qapi-schema/flat-union-empty.json create mode 100644 tests/qapi-schema/flat-union-empty.out create mode 100644 tests/qapi-schema/union-empty.err create mode 100644 tests/qapi-schema/union-empty.exit create mode 100644 tests/qapi-schema/union-empty.json create mode 100644 tests/qapi-schema/union-empty.out
Signature · 1 line
2.4.3