qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection clean


From: Eric Blake
Subject: [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C)
Date: Tue, 3 Nov 2015 23:20:22 -0700

No pending prerequisites; based on qemu.git master

Also available as a tag at this location:
git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9c

and will soon be part of my branch with the rest of the v5 series, at:
http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi

v9 notes:
More patches added, and several reorganized.  Lots of new patches
from Markus, although not in the order originally proposed.

The first 8 patches are fairly straightforward, and could probably
be taken as-is. Patch 9 is a rewrite of v8 4/17, but in the opposite
direction (document that no sorting is done, rather than attempting
to sort), so it may need further fine-tuning.  Patches 12-21
represents a fusion of Markus' and my attempts to rewrite v5 7/17
into a more-reviewable set of patches, and caused further churn
later in the series.

Patch 23 still uses tag_member.type == None; I ran out of time to
work on Markus' idea of providing an instance of QAPISchemaBuiltinType
to fill the role for 'qtype_code' without being exposed through .json
files and without breaking the invariant of a valid member.type after
check(), and wanted to get the rest of the series started under revew.
So I may need a followup patch or even a v10 of the later half of
this series after exploring that idea more.

Here's what backport-diff has to say in relation to v8.

001/27:[----] [--] 'qapi: Use generated TestStruct machinery in tests'
002/27:[----] [--] 'qapi: Strengthen test of TestStructList'
003/27:[0001] [FC] 'qapi: Plug leaks in test-qmp-*'
004/27:[0010] [FC] 'qapi: Simplify error testing in test-qmp-*'
005/27:[down] 'qapi: More tests of alternate output'
006/27:[----] [--] 'qapi: Test failure in middle of array parse'
007/27:[----] [--] 'qapi: More tests of input arrays'
008/27:[----] [--] 'qapi: Provide nicer array names in introspection'
009/27:[down] 'qapi-introspect: Document lack of sorting'
010/27:[0008] [FC] 'qapi: Track simple union tag in object.local_members'
011/27:[0001] [FC] 'qapi-types: Consolidate gen_struct() and gen_union()'
012/27:[down] 'qapi-types: Simplify gen_struct_field[s]'
013/27:[down] 'qapi: Drop obsolete tag value collision assertions'
014/27:[down] 'qapi: Fix up commit 7618b91's clash sanity checking change'
015/27:[down] 'qapi: Simplify QAPISchemaObjectTypeMember.check()'
016/27:[down] 'qapi: Eliminate QAPISchemaObjectType.check() variable members'
017/27:[down] 'qapi: Clean up after previous commit'
018/27:[down] 'qapi: Factor out QAPISchemaObjectTypeMember.check_clash()'
019/27:[down] 'qapi: Check for qapi collisions of flat union branches'
020/27:[down] 'qapi: Simplify QAPISchemaObjectTypeVariants.check()'
021/27:[down] 'qapi: Factor out QAPISchemaObjectType.check_clash()'
022/27:[----] [--] 'qapi: Remove outdated tests related to QMP/branch 
collisions'
023/27:[0070] [FC] 'qapi: Simplify visiting of alternate types'
024/27:[0014] [FC] 'qapi: Fix alternates that accept 'number' but not 'int''
025/27:[0018] [FC] 'qapi: Add positive tests to qapi-schema-test'
026/27:[----] [--] 'qapi: Remove dead visitor code'
027/27:[----] [--] 'qapi: Simplify visits of optional fields'

v8 notes:
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg06674.html
Minor changes when rebasing to latest, improved commit messages in
a few places, plus the addition of a few new patches. Markus started
reviewing v7, but hadn't gotten very far.

v7 notes:
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04112.html
Patches 1-3 of the previous round have moved to subset B; patch 7
is gone, and a couple of new patches are present in this round. The
latest version of subset B made it much easier to reason about
collision detection (namely, tag values can't collide with QMP values
thanks to a named rather than anonymous union in the C type), and I
like how things turned out.  I suspect the hardest part of the review
will be patches 5/14 and 7/14, although none of this has really
had much review in any earlier versions.

v6 notes:
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg01980.html
Add some patches and rebase onto work on subset B. Rearrange some
patches from v5 (this set includes 17-20, 23, 25-27). Backport diff
gets a bit confused by one patch title changing.

Not much direct review comments, although some of the changes here
are updated based on comments made on other patches in the v5 series.

Subset D (and more?) will come later.

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 (20):
  qapi: Use generated TestStruct machinery in tests
  qapi: Strengthen test of TestStructList
  qapi: Plug leaks in test-qmp-*
  qapi: Simplify error testing in test-qmp-*
  qapi: More tests of alternate output
  qapi: Test failure in middle of array parse
  qapi: More tests of input arrays
  qapi: Provide nicer array names in introspection
  qapi-introspect: Document lack of sorting
  qapi: Track simple union tag in object.local_members
  qapi-types: Consolidate gen_struct() and gen_union()
  qapi-types: Simplify gen_struct_field[s]
  qapi: Check for qapi collisions of flat union branches
  qapi: Factor out QAPISchemaObjectType.check_clash()
  qapi: Remove outdated tests related to QMP/branch collisions
  qapi: Simplify visiting of alternate types
  qapi: Fix alternates that accept 'number' but not 'int'
  qapi: Add positive tests to qapi-schema-test
  qapi: Remove dead visitor code
  qapi: Simplify visits of optional fields

Markus Armbruster (7):
  qapi: Drop obsolete tag value collision assertions
  qapi: Fix up commit 7618b91's clash sanity checking change
  qapi: Simplify QAPISchemaObjectTypeMember.check()
  qapi: Eliminate QAPISchemaObjectType.check() variable members
  qapi: Clean up after previous commits
  qapi: Factor out QAPISchemaObjectTypeMember.check_clash()
  qapi: Simplify QAPISchemaObjectTypeVariants.check()

 docs/qapi-code-gen.txt                         |  29 ++-
 include/qapi/visitor-impl.h                    |  27 ++-
 include/qapi/visitor.h                         |  22 +-
 qapi/introspect.json                           |  21 +-
 qapi/opts-visitor.c                            |   2 +-
 qapi/qapi-visit-core.c                         | 141 +++++--------
 qapi/qmp-input-visitor.c                       |  11 +-
 qapi/string-input-visitor.c                    |   3 +-
 scripts/qapi-introspect.py                     |   8 +-
 scripts/qapi-types.py                          | 102 +++-------
 scripts/qapi-visit.py                          |  28 ++-
 scripts/qapi.py                                | 115 ++++++-----
 tests/Makefile                                 |   3 -
 tests/qapi-schema/alternate-empty.out          |   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 |  18 --
 tests/qapi-schema/flat-union-clash-branch.out  |  14 --
 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   |  14 --
 tests/qapi-schema/flat-union-clash-type.out    |   0
 tests/qapi-schema/qapi-schema-test.json        |  22 +-
 tests/qapi-schema/qapi-schema-test.out         |  42 +++-
 tests/qapi-schema/union-clash-data.out         |   1 +
 tests/qapi-schema/union-clash-type.err         |   1 -
 tests/qapi-schema/union-clash-type.exit        |   1 -
 tests/qapi-schema/union-clash-type.json        |   9 -
 tests/qapi-schema/union-clash-type.out         |   0
 tests/qapi-schema/union-empty.out              |   1 +
 tests/test-qmp-input-strict.c                  | 108 +++-------
 tests/test-qmp-input-visitor.c                 | 268 +++++++++++--------------
 tests/test-qmp-output-visitor.c                | 153 ++++----------
 tests/test-visitor-serialization.c             |  76 ++-----
 34 files changed, 498 insertions(+), 746 deletions(-)
 delete mode 100644 tests/qapi-schema/flat-union-clash-branch.err
 delete mode 100644 tests/qapi-schema/flat-union-clash-branch.exit
 delete mode 100644 tests/qapi-schema/flat-union-clash-branch.json
 delete mode 100644 tests/qapi-schema/flat-union-clash-branch.out
 delete mode 100644 tests/qapi-schema/flat-union-clash-type.err
 delete mode 100644 tests/qapi-schema/flat-union-clash-type.exit
 delete mode 100644 tests/qapi-schema/flat-union-clash-type.json
 delete mode 100644 tests/qapi-schema/flat-union-clash-type.out
 delete mode 100644 tests/qapi-schema/union-clash-type.err
 delete mode 100644 tests/qapi-schema/union-clash-type.exit
 delete mode 100644 tests/qapi-schema/union-clash-type.json
 delete mode 100644 tests/qapi-schema/union-clash-type.out

-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]