qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v4 00/19] drop qapi nested structs


From: Eric Blake
Subject: [Qemu-devel] [PATCH v4 00/19] drop qapi nested structs
Date: Fri, 19 Sep 2014 16:24:45 -0600

After dragging my feet due to some libvirt work, I've finally
revived this patch series as promised.

v3 was here:
https://lists.gnu.org/archive/html/qemu-devel/2014-08/msg00725.html

v4:
  update commit message style [Markus]
  add docs (patches 3-4 are new) [Markus]
  lots of new tests (spread among 5, 7, 9, 11, 12)
  add comments to all new tests [Markus]
  rework check for valid expressions (patches 8, 10 are pretty much
    new, later patches rebased and simplified as a result)
  rebase to master
  fix tests to match file name (broken test in v3 patch 7 now fixed
    in patch 12)
  drop expr_name (v3 patch 8); series now validates expressions
    earlier (patch 8)
  consolidate '**' magic, and reject 'gen':'yes' in commands (patch
    14 is new)
  probably other stuff - it's been more than a month, so reviewers
    will probably want to start from scratch anyways :)

v3:
  No code changes, but fix mis-send of 11-14 [Peter]

v2:
  New patches: 1-2, 5-9
  consistent TAB usage in Makefile [Fam]
  catch more bad coding constructs, and test them
  avoid code duplication in type validity checks (patch 14 [former 7] is
    simpler because of patch 9)

Eric Blake (19):
  qapi: Consistent whitespace in tests/Makefile
  qapi: Ignore files created during make check
  qapi: Update docs given recent event, spacing fixes
  qapi: Document type-safety considerations
  qapi: Add some enum tests
  qapi: Better error messages for bad enums
  qapi: Add some expr tests
  qapi: Better error messages for bad expressions
  qapi: Add tests of redefined expressions
  qapi: Better error messages for duplicated expressions
  qapi: Add tests of type bypass
  qapi: Add some type check tests
  qapi: More rigourous checking of types
  qapi: More rigorous checking for type safety bypass
  qapi: Merge UserDefTwo and UserDefNested in tests
  qapi: Drop tests for inline subtypes
  qapi: Drop inline subtype in query-version
  qapi: Drop inline subtype in query-pci
  qapi: Drop support for inline subtypes

 docs/qapi-code-gen.txt                       | 349 +++++++++++++++++++++++----
 hmp.c                                        |  28 +--
 hw/pci/pci.c                                 |  42 ++--
 qapi-schema.json                             |  96 +++++---
 qapi/common.json                             |  26 +-
 qmp.c                                        |   9 +-
 scripts/qapi-commands.py                     |   8 +-
 scripts/qapi-event.py                        |   4 +-
 scripts/qapi-types.py                        |   9 +-
 scripts/qapi-visit.py                        |  37 +--
 scripts/qapi.py                              | 261 ++++++++++++++++----
 tests/.gitignore                             |   3 +
 tests/Makefile                               |  43 ++--
 tests/qapi-schema/bad-type-dict.err          |   1 +
 tests/qapi-schema/bad-type-dict.exit         |   1 +
 tests/qapi-schema/bad-type-dict.json         |   2 +
 tests/qapi-schema/bad-type-dict.out          |   0
 tests/qapi-schema/bad-type-int.err           |   1 +
 tests/qapi-schema/bad-type-int.exit          |   1 +
 tests/qapi-schema/bad-type-int.json          |   3 +
 tests/qapi-schema/bad-type-int.out           |   0
 tests/qapi-schema/data-array-empty.err       |   1 +
 tests/qapi-schema/data-array-empty.exit      |   1 +
 tests/qapi-schema/data-array-empty.json      |   2 +
 tests/qapi-schema/data-array-empty.out       |   0
 tests/qapi-schema/data-array-unknown.err     |   1 +
 tests/qapi-schema/data-array-unknown.exit    |   1 +
 tests/qapi-schema/data-array-unknown.json    |   2 +
 tests/qapi-schema/data-array-unknown.out     |   0
 tests/qapi-schema/data-int.err               |   1 +
 tests/qapi-schema/data-int.exit              |   1 +
 tests/qapi-schema/data-int.json              |   2 +
 tests/qapi-schema/data-int.out               |   0
 tests/qapi-schema/data-member-array-bad.err  |   1 +
 tests/qapi-schema/data-member-array-bad.exit |   1 +
 tests/qapi-schema/data-member-array-bad.json |   2 +
 tests/qapi-schema/data-member-array-bad.out  |   0
 tests/qapi-schema/data-member-array.err      |   0
 tests/qapi-schema/data-member-array.exit     |   1 +
 tests/qapi-schema/data-member-array.json     |   4 +
 tests/qapi-schema/data-member-array.out      |   5 +
 tests/qapi-schema/data-member-unknown.err    |   1 +
 tests/qapi-schema/data-member-unknown.exit   |   1 +
 tests/qapi-schema/data-member-unknown.json   |   2 +
 tests/qapi-schema/data-member-unknown.out    |   0
 tests/qapi-schema/data-unknown.err           |   1 +
 tests/qapi-schema/data-unknown.exit          |   1 +
 tests/qapi-schema/data-unknown.json          |   2 +
 tests/qapi-schema/data-unknown.out           |   0
 tests/qapi-schema/double-data.err            |   1 +
 tests/qapi-schema/double-data.exit           |   1 +
 tests/qapi-schema/double-data.json           |   2 +
 tests/qapi-schema/double-data.out            |   0
 tests/qapi-schema/double-type.err            |   1 +
 tests/qapi-schema/double-type.exit           |   1 +
 tests/qapi-schema/double-type.json           |   2 +
 tests/qapi-schema/double-type.out            |   0
 tests/qapi-schema/enum-clash-member.err      |   1 +
 tests/qapi-schema/enum-clash-member.exit     |   1 +
 tests/qapi-schema/enum-clash-member.json     |   2 +
 tests/qapi-schema/enum-clash-member.out      |   0
 tests/qapi-schema/enum-dict-member.err       |   1 +
 tests/qapi-schema/enum-dict-member.exit      |   1 +
 tests/qapi-schema/enum-dict-member.json      |   2 +
 tests/qapi-schema/enum-dict-member.out       |   0
 tests/qapi-schema/enum-empty.err             |   0
 tests/qapi-schema/enum-empty.exit            |   1 +
 tests/qapi-schema/enum-empty.json            |   2 +
 tests/qapi-schema/enum-empty.out             |   3 +
 tests/qapi-schema/enum-int-member.err        |   1 +
 tests/qapi-schema/enum-int-member.exit       |   1 +
 tests/qapi-schema/enum-int-member.json       |   3 +
 tests/qapi-schema/enum-int-member.out        |   0
 tests/qapi-schema/enum-max-member.err        |   1 +
 tests/qapi-schema/enum-max-member.exit       |   1 +
 tests/qapi-schema/enum-max-member.json       |   3 +
 tests/qapi-schema/enum-max-member.out        |   0
 tests/qapi-schema/enum-missing-data.err      |   1 +
 tests/qapi-schema/enum-missing-data.exit     |   1 +
 tests/qapi-schema/enum-missing-data.json     |   2 +
 tests/qapi-schema/enum-missing-data.out      |   0
 tests/qapi-schema/enum-wrong-data.err        |   1 +
 tests/qapi-schema/enum-wrong-data.exit       |   1 +
 tests/qapi-schema/enum-wrong-data.json       |   2 +
 tests/qapi-schema/enum-wrong-data.out        |   0
 tests/qapi-schema/event-nest-struct.err      |   2 +-
 tests/qapi-schema/indented-expr.json         |   4 +-
 tests/qapi-schema/indented-expr.out          |   2 +-
 tests/qapi-schema/missing-type.err           |   1 +
 tests/qapi-schema/missing-type.exit          |   1 +
 tests/qapi-schema/missing-type.json          |   2 +
 tests/qapi-schema/missing-type.out           |   0
 tests/qapi-schema/nested-struct-data.err     |   1 +
 tests/qapi-schema/nested-struct-data.exit    |   1 +
 tests/qapi-schema/nested-struct-data.json    |   4 +
 tests/qapi-schema/nested-struct-data.out     |   0
 tests/qapi-schema/nested-struct-returns.err  |   1 +
 tests/qapi-schema/nested-struct-returns.exit |   1 +
 tests/qapi-schema/nested-struct-returns.json |   3 +
 tests/qapi-schema/nested-struct-returns.out  |   0
 tests/qapi-schema/qapi-schema-test.json      |  18 +-
 tests/qapi-schema/qapi-schema-test.out       |  10 +-
 tests/qapi-schema/redefined-builtin.err      |   1 +
 tests/qapi-schema/redefined-builtin.exit     |   1 +
 tests/qapi-schema/redefined-builtin.json     |   2 +
 tests/qapi-schema/redefined-builtin.out      |   0
 tests/qapi-schema/redefined-command.err      |   1 +
 tests/qapi-schema/redefined-command.exit     |   1 +
 tests/qapi-schema/redefined-command.json     |   3 +
 tests/qapi-schema/redefined-command.out      |   0
 tests/qapi-schema/redefined-event.err        |   1 +
 tests/qapi-schema/redefined-event.exit       |   1 +
 tests/qapi-schema/redefined-event.json       |   3 +
 tests/qapi-schema/redefined-event.out        |   0
 tests/qapi-schema/redefined-type.err         |   1 +
 tests/qapi-schema/redefined-type.exit        |   1 +
 tests/qapi-schema/redefined-type.json        |   3 +
 tests/qapi-schema/redefined-type.out         |   0
 tests/qapi-schema/returns-array-bad.err      |   1 +
 tests/qapi-schema/returns-array-bad.exit     |   1 +
 tests/qapi-schema/returns-array-bad.json     |   2 +
 tests/qapi-schema/returns-array-bad.out      |   0
 tests/qapi-schema/returns-int.err            |   0
 tests/qapi-schema/returns-int.exit           |   1 +
 tests/qapi-schema/returns-int.json           |   2 +
 tests/qapi-schema/returns-int.out            |   3 +
 tests/qapi-schema/returns-unknown.err        |   1 +
 tests/qapi-schema/returns-unknown.exit       |   1 +
 tests/qapi-schema/returns-unknown.json       |   2 +
 tests/qapi-schema/returns-unknown.out        |   0
 tests/qapi-schema/type-bypass-bad-gen.err    |   1 +
 tests/qapi-schema/type-bypass-bad-gen.exit   |   1 +
 tests/qapi-schema/type-bypass-bad-gen.json   |   2 +
 tests/qapi-schema/type-bypass-bad-gen.out    |   0
 tests/qapi-schema/type-bypass-no-gen.err     |   1 +
 tests/qapi-schema/type-bypass-no-gen.exit    |   1 +
 tests/qapi-schema/type-bypass-no-gen.json    |   2 +
 tests/qapi-schema/type-bypass-no-gen.out     |   0
 tests/qapi-schema/type-bypass.err            |   0
 tests/qapi-schema/type-bypass.exit           |   1 +
 tests/qapi-schema/type-bypass.json           |   2 +
 tests/qapi-schema/type-bypass.out            |   3 +
 tests/qapi-schema/unknown-expr-key.err       |   1 +
 tests/qapi-schema/unknown-expr-key.exit      |   1 +
 tests/qapi-schema/unknown-expr-key.json      |   2 +
 tests/qapi-schema/unknown-expr-key.out       |   0
 tests/test-qmp-commands.c                    |  35 +--
 tests/test-qmp-input-strict.c                |  19 +-
 tests/test-qmp-input-visitor.c               |  25 +-
 tests/test-qmp-output-visitor.c              |  64 ++---
 tests/test-visitor-serialization.c           |  84 ++++---
 151 files changed, 979 insertions(+), 348 deletions(-)
 create mode 100644 tests/qapi-schema/bad-type-dict.err
 create mode 100644 tests/qapi-schema/bad-type-dict.exit
 create mode 100644 tests/qapi-schema/bad-type-dict.json
 create mode 100644 tests/qapi-schema/bad-type-dict.out
 create mode 100644 tests/qapi-schema/bad-type-int.err
 create mode 100644 tests/qapi-schema/bad-type-int.exit
 create mode 100644 tests/qapi-schema/bad-type-int.json
 create mode 100644 tests/qapi-schema/bad-type-int.out
 create mode 100644 tests/qapi-schema/data-array-empty.err
 create mode 100644 tests/qapi-schema/data-array-empty.exit
 create mode 100644 tests/qapi-schema/data-array-empty.json
 create mode 100644 tests/qapi-schema/data-array-empty.out
 create mode 100644 tests/qapi-schema/data-array-unknown.err
 create mode 100644 tests/qapi-schema/data-array-unknown.exit
 create mode 100644 tests/qapi-schema/data-array-unknown.json
 create mode 100644 tests/qapi-schema/data-array-unknown.out
 create mode 100644 tests/qapi-schema/data-int.err
 create mode 100644 tests/qapi-schema/data-int.exit
 create mode 100644 tests/qapi-schema/data-int.json
 create mode 100644 tests/qapi-schema/data-int.out
 create mode 100644 tests/qapi-schema/data-member-array-bad.err
 create mode 100644 tests/qapi-schema/data-member-array-bad.exit
 create mode 100644 tests/qapi-schema/data-member-array-bad.json
 create mode 100644 tests/qapi-schema/data-member-array-bad.out
 create mode 100644 tests/qapi-schema/data-member-array.err
 create mode 100644 tests/qapi-schema/data-member-array.exit
 create mode 100644 tests/qapi-schema/data-member-array.json
 create mode 100644 tests/qapi-schema/data-member-array.out
 create mode 100644 tests/qapi-schema/data-member-unknown.err
 create mode 100644 tests/qapi-schema/data-member-unknown.exit
 create mode 100644 tests/qapi-schema/data-member-unknown.json
 create mode 100644 tests/qapi-schema/data-member-unknown.out
 create mode 100644 tests/qapi-schema/data-unknown.err
 create mode 100644 tests/qapi-schema/data-unknown.exit
 create mode 100644 tests/qapi-schema/data-unknown.json
 create mode 100644 tests/qapi-schema/data-unknown.out
 create mode 100644 tests/qapi-schema/double-data.err
 create mode 100644 tests/qapi-schema/double-data.exit
 create mode 100644 tests/qapi-schema/double-data.json
 create mode 100644 tests/qapi-schema/double-data.out
 create mode 100644 tests/qapi-schema/double-type.err
 create mode 100644 tests/qapi-schema/double-type.exit
 create mode 100644 tests/qapi-schema/double-type.json
 create mode 100644 tests/qapi-schema/double-type.out
 create mode 100644 tests/qapi-schema/enum-clash-member.err
 create mode 100644 tests/qapi-schema/enum-clash-member.exit
 create mode 100644 tests/qapi-schema/enum-clash-member.json
 create mode 100644 tests/qapi-schema/enum-clash-member.out
 create mode 100644 tests/qapi-schema/enum-dict-member.err
 create mode 100644 tests/qapi-schema/enum-dict-member.exit
 create mode 100644 tests/qapi-schema/enum-dict-member.json
 create mode 100644 tests/qapi-schema/enum-dict-member.out
 create mode 100644 tests/qapi-schema/enum-empty.err
 create mode 100644 tests/qapi-schema/enum-empty.exit
 create mode 100644 tests/qapi-schema/enum-empty.json
 create mode 100644 tests/qapi-schema/enum-empty.out
 create mode 100644 tests/qapi-schema/enum-int-member.err
 create mode 100644 tests/qapi-schema/enum-int-member.exit
 create mode 100644 tests/qapi-schema/enum-int-member.json
 create mode 100644 tests/qapi-schema/enum-int-member.out
 create mode 100644 tests/qapi-schema/enum-max-member.err
 create mode 100644 tests/qapi-schema/enum-max-member.exit
 create mode 100644 tests/qapi-schema/enum-max-member.json
 create mode 100644 tests/qapi-schema/enum-max-member.out
 create mode 100644 tests/qapi-schema/enum-missing-data.err
 create mode 100644 tests/qapi-schema/enum-missing-data.exit
 create mode 100644 tests/qapi-schema/enum-missing-data.json
 create mode 100644 tests/qapi-schema/enum-missing-data.out
 create mode 100644 tests/qapi-schema/enum-wrong-data.err
 create mode 100644 tests/qapi-schema/enum-wrong-data.exit
 create mode 100644 tests/qapi-schema/enum-wrong-data.json
 create mode 100644 tests/qapi-schema/enum-wrong-data.out
 create mode 100644 tests/qapi-schema/missing-type.err
 create mode 100644 tests/qapi-schema/missing-type.exit
 create mode 100644 tests/qapi-schema/missing-type.json
 create mode 100644 tests/qapi-schema/missing-type.out
 create mode 100644 tests/qapi-schema/nested-struct-data.err
 create mode 100644 tests/qapi-schema/nested-struct-data.exit
 create mode 100644 tests/qapi-schema/nested-struct-data.json
 create mode 100644 tests/qapi-schema/nested-struct-data.out
 create mode 100644 tests/qapi-schema/nested-struct-returns.err
 create mode 100644 tests/qapi-schema/nested-struct-returns.exit
 create mode 100644 tests/qapi-schema/nested-struct-returns.json
 create mode 100644 tests/qapi-schema/nested-struct-returns.out
 create mode 100644 tests/qapi-schema/redefined-builtin.err
 create mode 100644 tests/qapi-schema/redefined-builtin.exit
 create mode 100644 tests/qapi-schema/redefined-builtin.json
 create mode 100644 tests/qapi-schema/redefined-builtin.out
 create mode 100644 tests/qapi-schema/redefined-command.err
 create mode 100644 tests/qapi-schema/redefined-command.exit
 create mode 100644 tests/qapi-schema/redefined-command.json
 create mode 100644 tests/qapi-schema/redefined-command.out
 create mode 100644 tests/qapi-schema/redefined-event.err
 create mode 100644 tests/qapi-schema/redefined-event.exit
 create mode 100644 tests/qapi-schema/redefined-event.json
 create mode 100644 tests/qapi-schema/redefined-event.out
 create mode 100644 tests/qapi-schema/redefined-type.err
 create mode 100644 tests/qapi-schema/redefined-type.exit
 create mode 100644 tests/qapi-schema/redefined-type.json
 create mode 100644 tests/qapi-schema/redefined-type.out
 create mode 100644 tests/qapi-schema/returns-array-bad.err
 create mode 100644 tests/qapi-schema/returns-array-bad.exit
 create mode 100644 tests/qapi-schema/returns-array-bad.json
 create mode 100644 tests/qapi-schema/returns-array-bad.out
 create mode 100644 tests/qapi-schema/returns-int.err
 create mode 100644 tests/qapi-schema/returns-int.exit
 create mode 100644 tests/qapi-schema/returns-int.json
 create mode 100644 tests/qapi-schema/returns-int.out
 create mode 100644 tests/qapi-schema/returns-unknown.err
 create mode 100644 tests/qapi-schema/returns-unknown.exit
 create mode 100644 tests/qapi-schema/returns-unknown.json
 create mode 100644 tests/qapi-schema/returns-unknown.out
 create mode 100644 tests/qapi-schema/type-bypass-bad-gen.err
 create mode 100644 tests/qapi-schema/type-bypass-bad-gen.exit
 create mode 100644 tests/qapi-schema/type-bypass-bad-gen.json
 create mode 100644 tests/qapi-schema/type-bypass-bad-gen.out
 create mode 100644 tests/qapi-schema/type-bypass-no-gen.err
 create mode 100644 tests/qapi-schema/type-bypass-no-gen.exit
 create mode 100644 tests/qapi-schema/type-bypass-no-gen.json
 create mode 100644 tests/qapi-schema/type-bypass-no-gen.out
 create mode 100644 tests/qapi-schema/type-bypass.err
 create mode 100644 tests/qapi-schema/type-bypass.exit
 create mode 100644 tests/qapi-schema/type-bypass.json
 create mode 100644 tests/qapi-schema/type-bypass.out
 create mode 100644 tests/qapi-schema/unknown-expr-key.err
 create mode 100644 tests/qapi-schema/unknown-expr-key.exit
 create mode 100644 tests/qapi-schema/unknown-expr-key.json
 create mode 100644 tests/qapi-schema/unknown-expr-key.out

-- 
1.9.3




reply via email to

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