qapi: Another round of fixes and cleanups
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest26 patches 2 repliesIn review
- v126 patches 16 repliesSuperseded
Changes in v2 from the cover letter
* Trivially rebased, R-bys retained
* [PATCH 02] Clean up string literal to please pylint
* [PATCH 07] Commit message fix [Eric]
* [PATCH 20] Doc fix [Eric]
* [PATCH 21] Update test cases for the change even though they fail for other reasons [Eric]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | qapi: Clarify docs on including the same file multiple timesdocs/ | +2 | 0 replies | |
| 2/26 | qapi: Clean up cgen() and mcgen()scripts/ scripts/ | +13 | 0 replies | |
| 3/26 | qapi: Simplify guardname()scripts/ | +3 | 0 replies | |
| 4/26 | qapi-event: Clean up how name of enum QAPIEvent is madedocs/ scripts/ tests/ | +6 | 0 replies | |
| 5/26 | qapi: Reject -p arguments that break qapi-event.pyscripts/ | +6 | 0 replies | |
| 6/26 | qapi: Drop unused and useless parameters and variablesscripts/ scripts/ scripts/ +2 more | +35 | 0 replies | |
| 7/26 | qapi: Fix generated code when flat union has member 'kind'scripts/ scripts/ tests/ +1 more | +9 | 0 replies | |
| 8/26 | qapi: Generate a nicer struct for flat unionsscripts/ | +22 | 0 replies | |
| 9/26 | qapi-visit: Fix generated code when schema has forward refsscripts/ tests/ tests/ | +36 | 0 replies | |
| 10/26 | qapi-visit: Replace list implicit_structs by setscripts/ | +3 | 0 replies | |
| 11/26 | qapi-visit: Fix two name arguments passed to visitorsscripts/ | +6 | 0 replies | |
| 12/26 | tests/qapi-schema: Document alternate's enum lacks visit functiontests/ | +1 | 0 replies | |
| 13/26 | tests/qapi-schema: Document events with base don't worktests/ | +3 | 0 replies | |
| 14/26 | qapi: Document that input visitor semantics are prone to leaksscripts/ tests/ | +6 | 0 replies | |
| 15/26 | qapi: Document shortcoming with union 'data' branchscripts/ | +8 | 0 replies | |
| 16/26 | qapi: Document flaws in checking of namesscripts/ | +4 | 0 replies | |
| 17/26 | tests/qapi-schema: Restore test case for flat union base bugtests/ tests/ | +7 | 0 replies | |
| 18/26 | tests/qapi-schema: Rename tests from data- to args-tests/ tests/ tests/ +29 more | +9 | 0 replies | |
| 19/26 | qapi-tests: New tests for union, alternate command argumentstests/ tests/ tests/ +6 more | +16 | 0 replies | |
| 20/26 | qapi: Fix to reject union command and event argumentsdocs/ scripts/ tests/ +3 more | +8 | 0 replies | |
| 21/26 | qapi: Command returning anonymous type doesn't work, outlawdocs/ scripts/ tests/ +8 more | +16 | 0 replies | |
| 22/26 | qapi-commands: Fix gen_err_check(e) for e and e != 'local_err'scripts/ | +7 | 0 replies | |
| 23/26 | qapi-commands: Inline gen_marshal_output_call()scripts/ | +4 | 0 replies | |
| 24/26 | qapi-commands: Don't feed output of mcgen() to mcgen() againscripts/ | +21 | 0 replies | |
| 25/26 | qapi-commands: Drop useless initializationdocs/ scripts/ | +3 | 0 replies | |
| 26/26 | qapi: Generated code cleanupdocs/ scripts/ scripts/ +2 more | +39 | 0 replies |
Reviews trailers per patch
24 of 26 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 00/26] qapi: Another round of fixes and cleanups
v2:
* Trivially rebased, R-bys retained
* [PATCH 02] Clean up string literal to please pylint
* [PATCH 07] Commit message fix [Eric]
* [PATCH 20] Doc fix [Eric]
* [PATCH 21] Update test cases for the change even though they fail for other reasons [Eric]
Previously posted as part of "[PATCH RFC v2 00/47] qapi: QMP introspection". Changes since then:
* Trivially rebased, R-bys retained unless noted otherwise.
* PATCH 01: Squash in update of qapi-code-gen.txt examples to current code.
* PATCH 04: Update qapi-code-gen.txt for the change.
* PATCH 05: Fix typo of --prefix in error message [Eric].
* PATCH 06: Clearer commit message [Eric].
* PATCH 07+08: Old PATCH 07 split up into bug fix and cleanup, crediting Eric for the bug report. Generate comments on member inheritance [Eric], and move generated "union tag is" comment. R-by dropped.
* PATCH 14+15: New, from Eric.
* PATCH 16+18: New.
* PATCH 19: Add note on events to commit message. Drop invalid TODO [Eric]. Straightforward conflicts with new PATCH 18 resolved.
* PATCH 20: Fix events, too [Eric]. R-by dropped.
* PATCH 21+25: New.
* PATCH 26: Restore truncated commit message [Eric]. Update qapi-code-gen.txt for the change.
* Parches not mentioned are identical.
Eric Blake (2):
qapi: Document that input visitor semantics are prone to leaks
qapi: Document shortcoming with union 'data' branch
Markus Armbruster (24):
qapi: Clarify docs on including the same file multiple times
qapi: Clean up cgen() and mcgen()
qapi: Simplify guardname()
qapi-event: Clean up how name of enum QAPIEvent is made
qapi: Reject -p arguments that break qapi-event.py
qapi: Drop unused and useless parameters and variables
qapi: Fix generated code when flat union has member 'kind'
qapi: Generate a nicer struct for flat unions
qapi-visit: Fix generated code when schema has forward refs
qapi-visit: Replace list implicit_structs by set
qapi-visit: Fix two name arguments passed to visitors tests/qapi-schema: Document alternate's enum lacks visit function tests/qapi-schema: Document events with base don't work
qapi: Document flaws in checking of names tests/qapi-schema: Restore test case for flat union base bug tests/qapi-schema: Rename tests from data- to args-
qapi-tests: New tests for union, alternate command arguments
qapi: Fix to reject union command and event arguments
qapi: Command returning anonymous type doesn't work, outlaw
qapi-commands: Fix gen_err_check(e) for e and e != 'local_err'
qapi-commands: Inline gen_marshal_output_call()
qapi-commands: Don't feed output of mcgen() to mcgen() again
qapi-commands: Drop useless initialization
qapi: Generated code cleanup
docs/qapi-code-gen.txt | 48 +++++----
scripts/qapi-commands.py | 109 +++++++++-----------
scripts/qapi-event.py | 6 +-
scripts/qapi-types.py | 110 +++++++++++----------
scripts/qapi-visit.py | 93 ++++++++++-------
scripts/qapi.py | 46 +++++----
tests/Makefile | 9 +-
tests/qapi-schema/args-alternate.err | 1 +
...ted-struct-returns.exit => args-alternate.exit} | 0
tests/qapi-schema/args-alternate.json | 3 +
...ested-struct-returns.out => args-alternate.out} | 0
.../{data-array-empty.err => args-array-empty.err} | 2 +-
.../{data-unknown.exit => args-array-empty.exit} | 0
...data-array-empty.json => args-array-empty.json} | 0
.../{data-unknown.out => args-array-empty.out} | 0
...ta-array-unknown.err => args-array-unknown.err} | 2 +-
...member-unknown.exit => args-array-unknown.exit} | 0
...-array-unknown.json => args-array-unknown.json} | 0
...a-member-unknown.out => args-array-unknown.out} | 0
tests/qapi-schema/args-int.err | 1 +
.../{data-member-array-bad.exit => args-int.exit} | 0
tests/qapi-schema/{data-int.json => args-int.json} | 0
.../{data-member-array.err => args-int.out} | 0
...ber-array-bad.err => args-member-array-bad.err} | 2 +-
.../{data-int.exit => args-member-array-bad.exit} | 0
...r-array-bad.json => args-member-array-bad.json} | 0
...ber-array-bad.out => args-member-array-bad.out} | 0
.../{data-int.out => args-member-array.err} | 0
...ta-member-array.exit => args-member-array.exit} | 0
...ta-member-array.json => args-member-array.json} | 0
...data-member-array.out => args-member-array.out} | 0
tests/qapi-schema/args-member-unknown.err | 1 +
...array-unknown.exit => args-member-unknown.exit} | 0
...ember-unknown.json => args-member-unknown.json} | 0
...a-array-unknown.out => args-member-unknown.out} | 0
tests/qapi-schema/args-union.err | 1 +
.../{data-array-empty.exit => args-union.exit} | 0
tests/qapi-schema/args-union.json | 4 +
.../{data-array-empty.out => args-union.out} | 0
tests/qapi-schema/args-unknown.err | 1 +
tests/qapi-schema/args-unknown.exit | 1 +
.../{data-unknown.json => args-unknown.json} | 0
tests/qapi-schema/args-unknown.out | 0
tests/qapi-schema/command-int.json | 3 +-
tests/qapi-schema/data-int.err | 1 -
tests/qapi-schema/data-member-unknown.err | 1 -
tests/qapi-schema/data-unknown.err | 1 -
tests/qapi-schema/nested-struct-data.json | 3 +-
tests/qapi-schema/nested-struct-returns.err | 1 -
tests/qapi-schema/nested-struct-returns.json | 3 -
tests/qapi-schema/qapi-schema-test.json | 39 +++++---
tests/qapi-schema/qapi-schema-test.out | 14 +--
tests/qapi-schema/returns-dict.err | 1 +
tests/qapi-schema/returns-dict.exit | 1 +
tests/qapi-schema/returns-dict.json | 2 +
tests/qapi-schema/returns-dict.out | 0
tests/test-qmp-event.c | 2 +-
tests/test-qmp-input-visitor.c | 4 +-
tests/test-qmp-output-visitor.c | 2 +-
59 files changed, 276 insertions(+), 242 deletions(-)
create mode 100644 tests/qapi-schema/args-alternate.err
rename tests/qapi-schema/{nested-struct-returns.exit => args-alternate.exit} (100%)
create mode 100644 tests/qapi-schema/args-alternate.json
rename tests/qapi-schema/{nested-struct-returns.out => args-alternate.out} (100%)
rename tests/qapi-schema/{data-array-empty.err => args-array-empty.err} (50%)
rename tests/qapi-schema/{data-unknown.exit => args-array-empty.exit} (100%)
rename tests/qapi-schema/{data-array-empty.json => args-array-empty.json} (100%)
rename tests/qapi-schema/{data-unknown.out => args-array-empty.out} (100%)
rename tests/qapi-schema/{data-array-unknown.err => args-array-unknown.err} (50%)
rename tests/qapi-schema/{data-member-unknown.exit => args-array-unknown.exit} (100%)
rename tests/qapi-schema/{data-array-unknown.json => args-array-unknown.json} (100%)
rename tests/qapi-schema/{data-member-unknown.out => args-array-unknown.out} (100%)
create mode 100644 tests/qapi-schema/args-int.err
rename tests/qapi-schema/{data-member-array-bad.exit => args-int.exit} (100%)
rename tests/qapi-schema/{data-int.json => args-int.json} (100%)
rename tests/qapi-schema/{data-member-array.err => args-int.out} (100%)
rename tests/qapi-schema/{data-member-array-bad.err => args-member-array-bad.err} (52%)
rename tests/qapi-schema/{data-int.exit => args-member-array-bad.exit} (100%)
rename tests/qapi-schema/{data-member-array-bad.json => args-member-array-bad.json} (100%)
rename tests/qapi-schema/{data-member-array-bad.out => args-member-array-bad.out} (100%)
rename tests/qapi-schema/{data-int.out => args-member-array.err} (100%)
rename tests/qapi-schema/{data-member-array.exit => args-member-array.exit} (100%)
rename tests/qapi-schema/{data-member-array.json => args-member-array.json} (100%)
rename tests/qapi-schema/{data-member-array.out => args-member-array.out} (100%)
create mode 100644 tests/qapi-schema/args-member-unknown.err
rename tests/qapi-schema/{data-array-unknown.exit => args-member-unknown.exit} (100%)
rename tests/qapi-schema/{data-member-unknown.json => args-member-unknown.json} (100%)
rename tests/qapi-schema/{data-array-unknown.out => args-member-unknown.out} (100%)
create mode 100644 tests/qapi-schema/args-union.err
rename tests/qapi-schema/{data-array-empty.exit => args-union.exit} (100%)
create mode 100644 tests/qapi-schema/args-union.json
rename tests/qapi-schema/{data-array-empty.out => args-union.out} (100%)
create mode 100644 tests/qapi-schema/args-unknown.err
create mode 100644 tests/qapi-schema/args-unknown.exit
rename tests/qapi-schema/{data-unknown.json => args-unknown.json} (100%)
create mode 100644 tests/qapi-schema/args-unknown.out
delete mode 100644 tests/qapi-schema/data-int.err
delete mode 100644 tests/qapi-schema/data-member-unknown.err
delete mode 100644 tests/qapi-schema/data-unknown.err
delete mode 100644 tests/qapi-schema/nested-struct-returns.err
delete mode 100644 tests/qapi-schema/nested-struct-returns.json
create mode 100644 tests/qapi-schema/returns-dict.err
create mode 100644 tests/qapi-schema/returns-dict.exit
create mode 100644 tests/qapi-schema/returns-dict.json
create mode 100644 tests/qapi-schema/returns-dict.outSignature · 1 line
2.4.3