[Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements

Markus Armbruster posted 16 patches 4 years, 7 months ago
Test docker-clang@ubuntu failed
Test FreeBSD passed
Test checkpatch failed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190913201349.24332-1-armbru@redhat.com
Maintainers: Michael Roth <mdroth@linux.vnet.ibm.com>, Markus Armbruster <armbru@redhat.com>
docs/devel/qapi-code-gen.txt                  | 1071 ++++++++++-------
tests/test-qmp-cmds.c                         |    4 +
scripts/git.orderfile                         |    4 +-
scripts/qapi/commands.py                      |    4 +-
scripts/qapi/common.py                        |  147 +--
scripts/qapi/events.py                        |   12 +-
tests/Makefile.include                        |    7 +-
tests/qapi-schema/alternate-empty.err         |    2 +-
tests/qapi-schema/alternate-empty.json        |    4 +-
tests/qapi-schema/args-boxed-empty.err        |    1 -
tests/qapi-schema/args-boxed-empty.json       |    3 -
tests/qapi-schema/args-invalid.err            |    2 +-
tests/qapi-schema/doc-missing.err             |    2 +-
tests/qapi-schema/doc-no-symbol.err           |    2 +-
tests/qapi-schema/enum-bad-name.err           |    2 +-
tests/qapi-schema/enum-bad-name.json          |    3 +-
tests/qapi-schema/enum-clash-member.err       |    2 +-
.../qapi-schema/enum-dict-member-unknown.err  |    2 +-
tests/qapi-schema/enum-member-case.err        |    2 +-
tests/qapi-schema/escape-outside-string.err   |    1 -
tests/qapi-schema/escape-outside-string.json  |    3 -
tests/qapi-schema/escape-too-big.err          |    1 -
tests/qapi-schema/escape-too-big.exit         |    1 -
tests/qapi-schema/escape-too-big.json         |    3 -
tests/qapi-schema/escape-too-big.out          |    0
tests/qapi-schema/escape-too-short.err        |    1 -
tests/qapi-schema/escape-too-short.exit       |    1 -
tests/qapi-schema/escape-too-short.json       |    3 -
tests/qapi-schema/escape-too-short.out        |    0
tests/qapi-schema/flat-union-empty.err        |    2 +-
tests/qapi-schema/flat-union-empty.json       |    2 +-
tests/qapi-schema/ident-with-escape.err       |    1 +
tests/qapi-schema/ident-with-escape.exit      |    2 +-
tests/qapi-schema/ident-with-escape.json      |    2 +-
tests/qapi-schema/ident-with-escape.out       |   16 -
tests/qapi-schema/pragma-non-dict.err         |    2 +-
tests/qapi-schema/qapi-schema-test.json       |   13 +-
tests/qapi-schema/qapi-schema-test.out        |   21 +-
tests/qapi-schema/string-code-point-127.err   |    1 +
...-empty.exit => string-code-point-127.exit} |    0
tests/qapi-schema/string-code-point-127.json  |    2 +
...ed-empty.out => string-code-point-127.out} |    0
tests/qapi-schema/string-code-point-31.err    |    1 +
...-string.exit => string-code-point-31.exit} |    0
tests/qapi-schema/string-code-point-31.json   |    2 +
...de-string.out => string-code-point-31.out} |    0
tests/qapi-schema/struct-data-invalid.err     |    2 +-
tests/qapi-schema/unicode-str.err             |    1 -
tests/qapi-schema/unicode-str.exit            |    1 -
tests/qapi-schema/unicode-str.json            |    2 -
tests/qapi-schema/unicode-str.out             |    0
tests/qapi-schema/union-empty.err             |    2 +-
tests/qapi-schema/union-empty.json            |    2 +-
tests/qapi-schema/unknown-escape.json         |    2 +-
54 files changed, 744 insertions(+), 625 deletions(-)
delete mode 100644 tests/qapi-schema/args-boxed-empty.err
delete mode 100644 tests/qapi-schema/args-boxed-empty.json
delete mode 100644 tests/qapi-schema/escape-outside-string.err
delete mode 100644 tests/qapi-schema/escape-outside-string.json
delete mode 100644 tests/qapi-schema/escape-too-big.err
delete mode 100644 tests/qapi-schema/escape-too-big.exit
delete mode 100644 tests/qapi-schema/escape-too-big.json
delete mode 100644 tests/qapi-schema/escape-too-big.out
delete mode 100644 tests/qapi-schema/escape-too-short.err
delete mode 100644 tests/qapi-schema/escape-too-short.exit
delete mode 100644 tests/qapi-schema/escape-too-short.json
delete mode 100644 tests/qapi-schema/escape-too-short.out
create mode 100644 tests/qapi-schema/string-code-point-127.err
rename tests/qapi-schema/{args-boxed-empty.exit => string-code-point-127.exit} (100%)
create mode 100644 tests/qapi-schema/string-code-point-127.json
rename tests/qapi-schema/{args-boxed-empty.out => string-code-point-127.out} (100%)
create mode 100644 tests/qapi-schema/string-code-point-31.err
rename tests/qapi-schema/{escape-outside-string.exit => string-code-point-31.exit} (100%)
create mode 100644 tests/qapi-schema/string-code-point-31.json
rename tests/qapi-schema/{escape-outside-string.out => string-code-point-31.out} (100%)
delete mode 100644 tests/qapi-schema/unicode-str.err
delete mode 100644 tests/qapi-schema/unicode-str.exit
delete mode 100644 tests/qapi-schema/unicode-str.json
delete mode 100644 tests/qapi-schema/unicode-str.out
[Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements
Posted by Markus Armbruster 4 years, 7 months ago
v3:
* PATCH 05
  - Typo fixed [Eric]
* PATCH 06+07
  - Additional comments [Eric]
* PATCH 11
  - Replace one more QAPISchemaMember by QAPISchemaEnumMember
* PATCH 13+15
  - Doc phrasing tweaks [Eric]
* PATCH 14+15
  - Belatedly update for v2's restriction to printable ASCII [Eric]
  - Correct claim "order of top-level expression doesn't matter" [Eric]
* PATCH 15
  - Fix EBNF for PRAGMA [Eric]

v2:
* PATCH v1 05: Dropped
* PATCH 01,05,07-11,16: New
* PATCH 03:
  - Commit message typo fixed
  - Assertions tightened
* PATCH 04:
  - Document member name 'u' is reserved
  - Drop an accidental change to section "Enumeration types"
  - Typo fixed
* PATCH 06:
  - Outlaw anything but printable ASCII, not just control characters
* PATCH 15:
  - Adopt more convenient terminology: directive, definition
  - Explanation of grammar notation missed grouping
  - Drop a more text redundant with the grammar
  - Drop more text redundant with section "Naming rules and reserved
    names"
  - Turn "boxed needs data: STRING" into syntax
  - Improve section "Documentation comments" some more
  - Minor phrasing tweaks

Markus Armbruster (16):
  scripts/git.orderfile: Match QAPI schema more precisely
  qapi: Drop check_type()'s redundant parameter @allow_optional
  qapi: Drop support for boxed alternate arguments
  docs/devel/qapi-code-gen: Minor specification fixes
  tests/qapi-schema: Demonstrate bad reporting of funny characters
  qapi: Restrict strings to printable ASCII
  qapi: Drop support for escape sequences other than \\
  qapi: Permit 'boxed' with empty type
  qapi: Permit alternates with just one branch
  qapi: Permit omitting all flat union branches
  qapi: Adjust frontend errors to say enum value, not member
  docs/devel/qapi-code-gen: Reorder sections for readability
  docs/devel/qapi-code-gen: Rewrite compatibility considerations
  docs/devel/qapi-code-gen: Rewrite introduction to schema
  docs/devel/qapi-code-gen: Improve QAPI schema language doc
  qapi: Tweak code to match docs/devel/qapi-code-gen.txt

 docs/devel/qapi-code-gen.txt                  | 1071 ++++++++++-------
 tests/test-qmp-cmds.c                         |    4 +
 scripts/git.orderfile                         |    4 +-
 scripts/qapi/commands.py                      |    4 +-
 scripts/qapi/common.py                        |  147 +--
 scripts/qapi/events.py                        |   12 +-
 tests/Makefile.include                        |    7 +-
 tests/qapi-schema/alternate-empty.err         |    2 +-
 tests/qapi-schema/alternate-empty.json        |    4 +-
 tests/qapi-schema/args-boxed-empty.err        |    1 -
 tests/qapi-schema/args-boxed-empty.json       |    3 -
 tests/qapi-schema/args-invalid.err            |    2 +-
 tests/qapi-schema/doc-missing.err             |    2 +-
 tests/qapi-schema/doc-no-symbol.err           |    2 +-
 tests/qapi-schema/enum-bad-name.err           |    2 +-
 tests/qapi-schema/enum-bad-name.json          |    3 +-
 tests/qapi-schema/enum-clash-member.err       |    2 +-
 .../qapi-schema/enum-dict-member-unknown.err  |    2 +-
 tests/qapi-schema/enum-member-case.err        |    2 +-
 tests/qapi-schema/escape-outside-string.err   |    1 -
 tests/qapi-schema/escape-outside-string.json  |    3 -
 tests/qapi-schema/escape-too-big.err          |    1 -
 tests/qapi-schema/escape-too-big.exit         |    1 -
 tests/qapi-schema/escape-too-big.json         |    3 -
 tests/qapi-schema/escape-too-big.out          |    0
 tests/qapi-schema/escape-too-short.err        |    1 -
 tests/qapi-schema/escape-too-short.exit       |    1 -
 tests/qapi-schema/escape-too-short.json       |    3 -
 tests/qapi-schema/escape-too-short.out        |    0
 tests/qapi-schema/flat-union-empty.err        |    2 +-
 tests/qapi-schema/flat-union-empty.json       |    2 +-
 tests/qapi-schema/ident-with-escape.err       |    1 +
 tests/qapi-schema/ident-with-escape.exit      |    2 +-
 tests/qapi-schema/ident-with-escape.json      |    2 +-
 tests/qapi-schema/ident-with-escape.out       |   16 -
 tests/qapi-schema/pragma-non-dict.err         |    2 +-
 tests/qapi-schema/qapi-schema-test.json       |   13 +-
 tests/qapi-schema/qapi-schema-test.out        |   21 +-
 tests/qapi-schema/string-code-point-127.err   |    1 +
 ...-empty.exit => string-code-point-127.exit} |    0
 tests/qapi-schema/string-code-point-127.json  |    2 +
 ...ed-empty.out => string-code-point-127.out} |    0
 tests/qapi-schema/string-code-point-31.err    |    1 +
 ...-string.exit => string-code-point-31.exit} |    0
 tests/qapi-schema/string-code-point-31.json   |    2 +
 ...de-string.out => string-code-point-31.out} |    0
 tests/qapi-schema/struct-data-invalid.err     |    2 +-
 tests/qapi-schema/unicode-str.err             |    1 -
 tests/qapi-schema/unicode-str.exit            |    1 -
 tests/qapi-schema/unicode-str.json            |    2 -
 tests/qapi-schema/unicode-str.out             |    0
 tests/qapi-schema/union-empty.err             |    2 +-
 tests/qapi-schema/union-empty.json            |    2 +-
 tests/qapi-schema/unknown-escape.json         |    2 +-
 54 files changed, 744 insertions(+), 625 deletions(-)
 delete mode 100644 tests/qapi-schema/args-boxed-empty.err
 delete mode 100644 tests/qapi-schema/args-boxed-empty.json
 delete mode 100644 tests/qapi-schema/escape-outside-string.err
 delete mode 100644 tests/qapi-schema/escape-outside-string.json
 delete mode 100644 tests/qapi-schema/escape-too-big.err
 delete mode 100644 tests/qapi-schema/escape-too-big.exit
 delete mode 100644 tests/qapi-schema/escape-too-big.json
 delete mode 100644 tests/qapi-schema/escape-too-big.out
 delete mode 100644 tests/qapi-schema/escape-too-short.err
 delete mode 100644 tests/qapi-schema/escape-too-short.exit
 delete mode 100644 tests/qapi-schema/escape-too-short.json
 delete mode 100644 tests/qapi-schema/escape-too-short.out
 create mode 100644 tests/qapi-schema/string-code-point-127.err
 rename tests/qapi-schema/{args-boxed-empty.exit => string-code-point-127.exit} (100%)
 create mode 100644 tests/qapi-schema/string-code-point-127.json
 rename tests/qapi-schema/{args-boxed-empty.out => string-code-point-127.out} (100%)
 create mode 100644 tests/qapi-schema/string-code-point-31.err
 rename tests/qapi-schema/{escape-outside-string.exit => string-code-point-31.exit} (100%)
 create mode 100644 tests/qapi-schema/string-code-point-31.json
 rename tests/qapi-schema/{escape-outside-string.out => string-code-point-31.out} (100%)
 delete mode 100644 tests/qapi-schema/unicode-str.err
 delete mode 100644 tests/qapi-schema/unicode-str.exit
 delete mode 100644 tests/qapi-schema/unicode-str.json
 delete mode 100644 tests/qapi-schema/unicode-str.out

-- 
2.21.0


Re: [Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements
Posted by no-reply@patchew.org 4 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20190913201349.24332-1-armbru@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements
Message-id: 20190913201349.24332-1-armbru@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
9491787 qapi: Tweak code to match docs/devel/qapi-code-gen.txt
6fb4a27 docs/devel/qapi-code-gen: Improve QAPI schema language doc
a474494 docs/devel/qapi-code-gen: Rewrite introduction to schema
6640272 docs/devel/qapi-code-gen: Rewrite compatibility considerations
d3cec78 docs/devel/qapi-code-gen: Reorder sections for readability
b48aba3 qapi: Adjust frontend errors to say enum value, not member
70ce619 qapi: Permit omitting all flat union branches
4ecd688 qapi: Permit alternates with just one branch
6fb8f9e qapi: Permit 'boxed' with empty type
c5e9097 qapi: Drop support for escape sequences other than \\
113836f qapi: Restrict strings to printable ASCII
fe760f3 tests/qapi-schema: Demonstrate bad reporting of funny characters
776df7c docs/devel/qapi-code-gen: Minor specification fixes
181a438 qapi: Drop support for boxed alternate arguments
57f9740 qapi: Drop check_type()'s redundant parameter @allow_optional
7975c5d scripts/git.orderfile: Match QAPI schema more precisely

=== OUTPUT BEGIN ===
1/16 Checking commit 7975c5d69cca (scripts/git.orderfile: Match QAPI schema more precisely)
2/16 Checking commit 57f9740b5d6c (qapi: Drop check_type()'s redundant parameter @allow_optional)
3/16 Checking commit 181a4384e8b8 (qapi: Drop support for boxed alternate arguments)
4/16 Checking commit 776df7cd45c6 (docs/devel/qapi-code-gen: Minor specification fixes)
5/16 Checking commit fe760f39461c (tests/qapi-schema: Demonstrate bad reporting of funny characters)
6/16 Checking commit 113836f31dd5 (qapi: Restrict strings to printable ASCII)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#109: 
new file mode 100644

ERROR: Invalid UTF-8, patch and commit message should be encoded in UTF-8
#126: FILE: tests/qapi-schema/string-code-point-127.json:2:
+{ 'command': '⌦' }
               ^

ERROR: Invalid UTF-8, patch and commit message should be encoded in UTF-8
#152: FILE: tests/qapi-schema/string-code-point-31.json:2:
+{ 'command': '␟' }
               ^

total: 2 errors, 1 warnings, 76 lines checked

Patch 6/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/16 Checking commit c5e90975c8c5 (qapi: Drop support for escape sequences other than \\)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#74: 
deleted file mode 100644

total: 0 errors, 1 warnings, 53 lines checked

Patch 7/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/16 Checking commit 6fb8f9e7baa7 (qapi: Permit 'boxed' with empty type)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#130: 
deleted file mode 100644

total: 0 errors, 1 warnings, 129 lines checked

Patch 8/16 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/16 Checking commit 4ecd688cd6a1 (qapi: Permit alternates with just one branch)
10/16 Checking commit 70ce619cf6af (qapi: Permit omitting all flat union branches)
11/16 Checking commit b48aba3a338c (qapi: Adjust frontend errors to say enum value, not member)
12/16 Checking commit d3cec7869722 (docs/devel/qapi-code-gen: Reorder sections for readability)
13/16 Checking commit 66402729d139 (docs/devel/qapi-code-gen: Rewrite compatibility considerations)
14/16 Checking commit a474494a010b (docs/devel/qapi-code-gen: Rewrite introduction to schema)
15/16 Checking commit 6fb4a273e1f6 (docs/devel/qapi-code-gen: Improve QAPI schema language doc)
16/16 Checking commit 9491787d3689 (qapi: Tweak code to match docs/devel/qapi-code-gen.txt)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190913201349.24332-1-armbru@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements
Posted by Markus Armbruster 4 years, 7 months ago
Queued with two small tweaks as per Eric's review: a commit message typo
fix in PATCH 10, and an additional paragraph on invisible schema changes
in PATCH 13.

Re: [Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements
Posted by Eric Blake 4 years, 7 months ago
On 9/13/19 3:13 PM, Markus Armbruster wrote:
> v3:
> * PATCH 05
>   - Typo fixed [Eric]
> * PATCH 06+07
>   - Additional comments [Eric]
> * PATCH 11
>   - Replace one more QAPISchemaMember by QAPISchemaEnumMember
> * PATCH 13+15
>   - Doc phrasing tweaks [Eric]
> * PATCH 14+15
>   - Belatedly update for v2's restriction to printable ASCII [Eric]
>   - Correct claim "order of top-level expression doesn't matter" [Eric]
> * PATCH 15
>   - Fix EBNF for PRAGMA [Eric]

Peter Krempa's proposal to add features to commands (for introspecting
Kevin's recent savevm fix) slightly conflicts with this.

https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03586.html

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements
Posted by Markus Armbruster 4 years, 7 months ago
Eric Blake <eblake@redhat.com> writes:

> On 9/13/19 3:13 PM, Markus Armbruster wrote:
>> v3:
>> * PATCH 05
>>   - Typo fixed [Eric]
>> * PATCH 06+07
>>   - Additional comments [Eric]
>> * PATCH 11
>>   - Replace one more QAPISchemaMember by QAPISchemaEnumMember
>> * PATCH 13+15
>>   - Doc phrasing tweaks [Eric]
>> * PATCH 14+15
>>   - Belatedly update for v2's restriction to printable ASCII [Eric]
>>   - Correct claim "order of top-level expression doesn't matter" [Eric]
>> * PATCH 15
>>   - Fix EBNF for PRAGMA [Eric]
>
> Peter Krempa's proposal to add features to commands (for introspecting
> Kevin's recent savevm fix) slightly conflicts with this.
>
> https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03586.html

I'm pretty sure it'll conflict plenty more with the
not-yet-posted-to-avoid-scaring-off-reviewers part of my work.  We'll
work it out :)