[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 00/16] post-introspection cleanups, subset A
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v6 00/16] post-introspection cleanups, subset A |
Date: |
Mon, 28 Sep 2015 21:27:13 -0600 |
Finally no pending prerequisites; this is based on current qemu.git.
Also available as a tag at this location:
git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv6a
and I plan forcefully update my branch with the rest of the v5
series tomorrow, at:
http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi
v6 notes:
This is patches 1-6 and 8-10 of my v5 series; patch 7 had enough
comments that I'm still reworking it and sank it later into that
series. It is 16 patches because I split several patches, and
added a couple more, in part because review on v5 let me discover
a place where we can crash the qapi code generator with an assert.
Addresses lots of review comments, mainly from Markus; see
individual patches for more details.
Subset B (and more?) will come later as Markus continues to
review either the rest of my v5 series, or as I get a chance
to post a rebased version of them.
Backport diffstat gets a bit lost because of the patch splits
and renames:
001/16:[----] [--] 'qapi: Sort qapi-schema tests'
002/16:[0009] [FC] 'qapi: Improve 'include' error message'
003/16:[down] 'qapi: Invoke exception superclass initializer'
004/16:[0017] [FC] 'qapi: Clean up qapi.py per pep8'
005/16:[down] 'qapi: Test for various name collisions'
006/16:[down] 'qapi: Avoid assertion failure on union 'type' collision'
007/16:[----] [-C] 'qapi: Add tests for empty unions'
008/16:[0180] [FC] 'qapi: Test use of 'number' within alternates'
009/16:[0006] [FC] 'qapi: Reuse code for flat union base validation'
010/16:[down] 'qapi: Consistent generated code: prefer error 'err''
011/16:[down] 'qapi: Consistent generated code: prefer visitor 'v''
012/16:[down] 'qapi: Consistent generated code: prefer common labels'
013/16:[down] 'qapi: Consistent generated code: prefer common indentation'
014/16:[down] 'qapi: Consistent generated code: minimize push_indent() usage'
015/16:[down] 'qapi: Share gen_err_check()'
016/16:[down] 'qapi: Share gen_visit_fields()'
In v5:
https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg05410.html
I _did_ rearrange patches to try and group related features:
1-2: Groundwork cleanups
3-5: Add more test cases
6-16: Front-end cleanups
17-18: Introspection output cleanups
19-20: 'alternate' type cleanups
21-29: qapi visitor cleanups
30-45: qapi-ify netdev_add
46: add qapi shorthand for flat unions
Lots of fixes based on additional testing, and rebased to
track other changes that happened in the meantime. The series
is huge; I can split off smaller portions as requested.
In v4:
https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02580.html
add some more clean up patches
rebase to Markus' recent work
pull in part of Zoltán's work to make netdev_add a flat union,
further enhancing it to be introspectible
I might be able to rearrange some of these patches, or separate
it into smaller independent series, if requested; but I'm
posting now to get review started.
In v3:
https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02059.html
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
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
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
Eric Blake (16):
qapi: Sort qapi-schema tests
qapi: Improve 'include' error message
qapi: Invoke exception superclass initializer
qapi: Clean up qapi.py per pep8
qapi: Test for various name collisions
qapi: Avoid assertion failure on union 'type' collision
qapi: Add tests for empty unions
qapi: Test use of 'number' within alternates
qapi: Reuse code for flat union base validation
qapi: Consistent generated code: prefer error 'err'
qapi: Consistent generated code: prefer visitor 'v'
qapi: Consistent generated code: prefer common labels
qapi: Consistent generated code: prefer common indentation
qapi: Consistent generated code: minimize push_indent() usage
qapi: Share gen_err_check()
qapi: Share gen_visit_fields()
docs/qapi-code-gen.txt | 110 +++++-----
qom/object.c | 18 +-
qom/qom-qobject.c | 18 +-
scripts/ordereddict.py | 3 +-
scripts/qapi-commands.py | 124 ++++-------
scripts/qapi-event.py | 55 +----
scripts/qapi-types.py | 8 +-
scripts/qapi-visit.py | 182 +++++++---------
scripts/qapi.py | 240 +++++++++++++++------
tests/Makefile | 171 +++++++++++----
...-union-branch-clash.out => alternate-empty.err} | 0
tests/qapi-schema/alternate-empty.exit | 1 +
tests/qapi-schema/alternate-empty.json | 2 +
tests/qapi-schema/alternate-empty.out | 4 +
tests/qapi-schema/alternate-nested.json | 2 +-
tests/qapi-schema/alternate-unknown.json | 2 +-
tests/qapi-schema/args-name-clash.err | 0
tests/qapi-schema/args-name-clash.exit | 1 +
tests/qapi-schema/args-name-clash.json | 2 +
tests/qapi-schema/args-name-clash.out | 6 +
tests/qapi-schema/flat-union-bad-base.err | 2 +-
tests/qapi-schema/flat-union-base-any.err | 2 +-
tests/qapi-schema/flat-union-base-union.err | 2 +-
tests/qapi-schema/flat-union-branch-clash.err | 1 -
tests/qapi-schema/flat-union-clash-branch.err | 0
tests/qapi-schema/flat-union-clash-branch.exit | 1 +
tests/qapi-schema/flat-union-clash-branch.json | 15 ++
tests/qapi-schema/flat-union-clash-branch.out | 14 ++
tests/qapi-schema/flat-union-clash-member.err | 1 +
...nch-clash.exit => flat-union-clash-member.exit} | 0
...nch-clash.json => flat-union-clash-member.json} | 2 +-
tests/qapi-schema/flat-union-clash-member.out | 0
tests/qapi-schema/flat-union-clash-type.err | 1 +
tests/qapi-schema/flat-union-clash-type.exit | 1 +
tests/qapi-schema/flat-union-clash-type.json | 11 +
tests/qapi-schema/flat-union-clash-type.out | 0
tests/qapi-schema/flat-union-cycle.err | 1 +
tests/qapi-schema/flat-union-cycle.exit | 1 +
tests/qapi-schema/flat-union-cycle.json | 7 +
tests/qapi-schema/flat-union-cycle.out | 0
tests/qapi-schema/flat-union-empty.err | 0
tests/qapi-schema/flat-union-empty.exit | 1 +
tests/qapi-schema/flat-union-empty.json | 4 +
tests/qapi-schema/flat-union-empty.out | 7 +
tests/qapi-schema/flat-union-inline.err | 2 +-
tests/qapi-schema/flat-union-inline.json | 4 +-
tests/qapi-schema/flat-union-no-base.err | 2 +-
tests/qapi-schema/include-non-file.err | 2 +-
tests/qapi-schema/include-non-file.json | 2 +-
tests/qapi-schema/qapi-schema-test.json | 15 +-
tests/qapi-schema/qapi-schema-test.out | 26 +++
tests/qapi-schema/struct-base-clash-base.err | 0
tests/qapi-schema/struct-base-clash-base.exit | 1 +
tests/qapi-schema/struct-base-clash-base.json | 6 +
tests/qapi-schema/struct-base-clash-base.out | 5 +
tests/qapi-schema/union-clash-data.err | 0
tests/qapi-schema/union-clash-data.exit | 1 +
tests/qapi-schema/union-clash-data.json | 4 +
tests/qapi-schema/union-clash-data.out | 6 +
tests/qapi-schema/union-clash-members.err | 1 +
tests/qapi-schema/union-clash-members.exit | 1 +
tests/qapi-schema/union-clash-members.json | 3 +
tests/qapi-schema/union-clash-members.out | 0
tests/qapi-schema/union-clash-type.err | 1 +
tests/qapi-schema/union-clash-type.exit | 1 +
tests/qapi-schema/union-clash-type.json | 3 +
tests/qapi-schema/union-clash-type.out | 0
tests/qapi-schema/union-empty.err | 0
tests/qapi-schema/union-empty.exit | 1 +
tests/qapi-schema/union-empty.json | 2 +
tests/qapi-schema/union-empty.out | 3 +
tests/qapi-schema/union-invalid-base.err | 2 +-
tests/test-qmp-input-visitor.c | 129 ++++++++++-
73 files changed, 807 insertions(+), 439 deletions(-)
rename tests/qapi-schema/{flat-union-branch-clash.out => alternate-empty.err}
(100%)
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-name-clash.err
create mode 100644 tests/qapi-schema/args-name-clash.exit
create mode 100644 tests/qapi-schema/args-name-clash.json
create mode 100644 tests/qapi-schema/args-name-clash.out
delete mode 100644 tests/qapi-schema/flat-union-branch-clash.err
create mode 100644 tests/qapi-schema/flat-union-clash-branch.err
create mode 100644 tests/qapi-schema/flat-union-clash-branch.exit
create mode 100644 tests/qapi-schema/flat-union-clash-branch.json
create mode 100644 tests/qapi-schema/flat-union-clash-branch.out
create mode 100644 tests/qapi-schema/flat-union-clash-member.err
rename tests/qapi-schema/{flat-union-branch-clash.exit =>
flat-union-clash-member.exit} (100%)
rename tests/qapi-schema/{flat-union-branch-clash.json =>
flat-union-clash-member.json} (85%)
create mode 100644 tests/qapi-schema/flat-union-clash-member.out
create mode 100644 tests/qapi-schema/flat-union-clash-type.err
create mode 100644 tests/qapi-schema/flat-union-clash-type.exit
create mode 100644 tests/qapi-schema/flat-union-clash-type.json
create mode 100644 tests/qapi-schema/flat-union-clash-type.out
create mode 100644 tests/qapi-schema/flat-union-cycle.err
create mode 100644 tests/qapi-schema/flat-union-cycle.exit
create mode 100644 tests/qapi-schema/flat-union-cycle.json
create mode 100644 tests/qapi-schema/flat-union-cycle.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/struct-base-clash-base.err
create mode 100644 tests/qapi-schema/struct-base-clash-base.exit
create mode 100644 tests/qapi-schema/struct-base-clash-base.json
create mode 100644 tests/qapi-schema/struct-base-clash-base.out
create mode 100644 tests/qapi-schema/union-clash-data.err
create mode 100644 tests/qapi-schema/union-clash-data.exit
create mode 100644 tests/qapi-schema/union-clash-data.json
create mode 100644 tests/qapi-schema/union-clash-data.out
create mode 100644 tests/qapi-schema/union-clash-members.err
create mode 100644 tests/qapi-schema/union-clash-members.exit
create mode 100644 tests/qapi-schema/union-clash-members.json
create mode 100644 tests/qapi-schema/union-clash-members.out
create mode 100644 tests/qapi-schema/union-clash-type.err
create mode 100644 tests/qapi-schema/union-clash-type.exit
create mode 100644 tests/qapi-schema/union-clash-type.json
create mode 100644 tests/qapi-schema/union-clash-type.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
--
2.4.3
- [Qemu-devel] [PATCH v6 00/16] post-introspection cleanups, subset A,
Eric Blake <=
- [Qemu-devel] [PATCH v6 03/16] qapi: Invoke exception superclass initializer, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 01/16] qapi: Sort qapi-schema tests, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 02/16] qapi: Improve 'include' error message, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 06/16] qapi: Avoid assertion failure on union 'type' collision, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 07/16] qapi: Add tests for empty unions, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 04/16] qapi: Clean up qapi.py per pep8, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 08/16] qapi: Test use of 'number' within alternates, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 09/16] qapi: Reuse code for flat union base validation, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 05/16] qapi: Test for various name collisions, Eric Blake, 2015/09/29
- [Qemu-devel] [PATCH v6 10/16] qapi: Consistent generated code: prefer error 'err', Eric Blake, 2015/09/29