All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C)
@ 2015-11-04  6:20 Eric Blake
  2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 01/27] qapi: Use generated TestStruct machinery in tests Eric Blake
                   ` (28 more replies)
  0 siblings, 29 replies; 75+ messages in thread
From: Eric Blake @ 2015-11-04  6:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

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

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

end of thread, other threads:[~2015-11-17  7:38 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04  6:20 [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C) Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 01/27] qapi: Use generated TestStruct machinery in tests Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 02/27] qapi: Strengthen test of TestStructList Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 03/27] qapi: Plug leaks in test-qmp-* Eric Blake
2015-11-04  8:19   ` Markus Armbruster
2015-11-04 17:24     ` Eric Blake
2015-11-04 17:44       ` Markus Armbruster
2015-11-05 13:09         ` Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 04/27] qapi: Simplify error testing " Eric Blake
2015-11-04  8:40   ` Markus Armbruster
2015-11-04 21:05     ` Eric Blake
2015-11-05  7:53       ` Markus Armbruster
2015-11-05 15:04         ` Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 05/27] qapi: More tests of alternate output Eric Blake
2015-11-04  9:04   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 06/27] qapi: Test failure in middle of array parse Eric Blake
2015-11-04  9:07   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 07/27] qapi: More tests of input arrays Eric Blake
2015-11-04  9:11   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 08/27] qapi: Provide nicer array names in introspection Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 09/27] qapi-introspect: Document lack of sorting Eric Blake
2015-11-04 10:09   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 10/27] qapi: Track simple union tag in object.local_members Eric Blake
2015-11-04 11:02   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 11/27] qapi-types: Consolidate gen_struct() and gen_union() Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 12/27] qapi-types: Simplify gen_struct_field[s] Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collision assertions Eric Blake
2015-11-04 13:30   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 14/27] qapi: Fix up commit 7618b91's clash sanity checking change Eric Blake
2015-11-04 13:36   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 15/27] qapi: Simplify QAPISchemaObjectTypeMember.check() Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 16/27] qapi: Eliminate QAPISchemaObjectType.check() variable members Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 17/27] qapi: Clean up after previous commit Eric Blake
2015-11-04 13:43   ` Markus Armbruster
2015-11-04 23:03     ` Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 18/27] qapi: Factor out QAPISchemaObjectTypeMember.check_clash() Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 19/27] qapi: Check for qapi collisions of flat union branches Eric Blake
2015-11-04 19:01   ` Markus Armbruster
2015-11-04 23:11     ` Eric Blake
2015-11-04 23:25       ` Eric Blake
2015-11-05  7:59         ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 20/27] qapi: Simplify QAPISchemaObjectTypeVariants.check() Eric Blake
2015-11-04 19:02   ` Markus Armbruster
2015-11-04 23:12     ` Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 21/27] qapi: Factor out QAPISchemaObjectType.check_clash() Eric Blake
2015-11-05 15:29   ` [Qemu-devel] [PATCH RFC 0/5] qapi: Use common name mangling for enumeration constants Markus Armbruster
2015-11-05 15:29     ` [Qemu-devel] [PATCH RFC 1/5] qapi: Generate a sed script to help eliminate camel_to_upper() Markus Armbruster
2015-11-05 15:29     ` [Qemu-devel] [PATCH RFC 2/5] Revert "qapi: Generate a sed script to help eliminate camel_to_upper()" Markus Armbruster
2015-11-05 15:30     ` [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants Markus Armbruster
2015-11-05 16:01       ` Daniel P. Berrange
2015-11-05 16:41         ` Eric Blake
2015-11-05 22:36           ` Eric Blake
2015-11-06 10:03           ` Markus Armbruster
2015-11-06 13:35             ` Markus Armbruster
2015-11-10 14:35               ` [Qemu-devel] What to do about QAPI naming convention violations (was: [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants) Markus Armbruster
2015-11-16 22:13                 ` [Qemu-devel] blkdebug event names [was: What to do about QAPI naming convention violations] Eric Blake
2015-11-17  7:38                   ` Markus Armbruster
2015-11-09  9:34         ` [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants Markus Armbruster
2015-11-09 10:53           ` Daniel P. Berrange
2015-11-05 15:30     ` [Qemu-devel] [PATCH RFC 4/5] crypto: Drop name mangling override Markus Armbruster
2015-11-05 15:30     ` [Qemu-devel] [PATCH RFC 5/5] Revert "qapi: allow override of default enum prefix naming" Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 22/27] qapi: Remove outdated tests related to QMP/branch collisions Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 23/27] qapi: Simplify visiting of alternate types Eric Blake
2015-11-05 17:01   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 24/27] qapi: Fix alternates that accept 'number' but not 'int' Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 25/27] qapi: Add positive tests to qapi-schema-test Eric Blake
2015-11-05 18:44   ` Markus Armbruster
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 26/27] qapi: Remove dead visitor code Eric Blake
2015-11-05 19:05   ` Markus Armbruster
2015-11-11  6:13     ` Eric Blake
2015-11-04  6:20 ` [Qemu-devel] [PATCH v9 27/27] qapi: Simplify visits of optional fields Eric Blake
2015-11-04 10:22 ` [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C) Markus Armbruster
2015-11-04 15:06   ` Eric Blake
2015-11-04 18:04     ` Markus Armbruster
2015-11-05 19:45 ` Markus Armbruster

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.