[Qemu-devel] [PATCH v4 0/6] file-posix: Add dynamic-auto-read-only QAPI feature

Kevin Wolf posted 6 patches 4 years, 10 months ago
Test s390x passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190530110255.16225-1-kwolf@redhat.com
Maintainers: Michael Roth <mdroth@linux.vnet.ibm.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
qapi/block-core.json                          |  13 +-
qapi/introspect.json                          |   6 +-
tests/qapi-schema/features-bad-type.json      |   3 +
.../qapi-schema/features-duplicate-name.json  |   3 +
tests/qapi-schema/features-missing-name.json  |   3 +
tests/qapi-schema/features-name-bad-type.json |   3 +
tests/qapi-schema/features-no-list.json       |   3 +
tests/qapi-schema/features-unknown-key.json   |   3 +
tests/qapi-schema/qapi-schema-test.json       |  39 +++
docs/devel/qapi-code-gen.txt                  |  38 +++
tests/test-qmp-cmds.c                         |   8 +
scripts/qapi/common.py                        | 228 +++++++++++++++---
scripts/qapi/doc.py                           |  15 +-
scripts/qapi/introspect.py                    |   6 +-
scripts/qapi/types.py                         |   3 +-
scripts/qapi/visit.py                         |   3 +-
tests/Makefile.include                        |   6 +
tests/qapi-schema/double-type.err             |   2 +-
tests/qapi-schema/features-bad-type.err       |   1 +
tests/qapi-schema/features-bad-type.exit      |   1 +
tests/qapi-schema/features-bad-type.out       |   0
tests/qapi-schema/features-duplicate-name.err |   1 +
.../qapi-schema/features-duplicate-name.exit  |   1 +
tests/qapi-schema/features-duplicate-name.out |   0
tests/qapi-schema/features-missing-name.err   |   1 +
tests/qapi-schema/features-missing-name.exit  |   1 +
tests/qapi-schema/features-missing-name.out   |   0
tests/qapi-schema/features-name-bad-type.err  |   1 +
tests/qapi-schema/features-name-bad-type.exit |   1 +
tests/qapi-schema/features-name-bad-type.out  |   0
tests/qapi-schema/features-no-list.err        |   1 +
tests/qapi-schema/features-no-list.exit       |   1 +
tests/qapi-schema/features-no-list.out        |   0
tests/qapi-schema/features-unknown-key.err    |   2 +
tests/qapi-schema/features-unknown-key.exit   |   1 +
tests/qapi-schema/features-unknown-key.out    |   0
tests/qapi-schema/qapi-schema-test.out        |  43 ++++
tests/qapi-schema/test-qapi.py                |   7 +-
tests/qapi-schema/unknown-expr-key.err        |   2 +-
39 files changed, 403 insertions(+), 47 deletions(-)
create mode 100644 tests/qapi-schema/features-bad-type.json
create mode 100644 tests/qapi-schema/features-duplicate-name.json
create mode 100644 tests/qapi-schema/features-missing-name.json
create mode 100644 tests/qapi-schema/features-name-bad-type.json
create mode 100644 tests/qapi-schema/features-no-list.json
create mode 100644 tests/qapi-schema/features-unknown-key.json
create mode 100644 tests/qapi-schema/features-bad-type.err
create mode 100644 tests/qapi-schema/features-bad-type.exit
create mode 100644 tests/qapi-schema/features-bad-type.out
create mode 100644 tests/qapi-schema/features-duplicate-name.err
create mode 100644 tests/qapi-schema/features-duplicate-name.exit
create mode 100644 tests/qapi-schema/features-duplicate-name.out
create mode 100644 tests/qapi-schema/features-missing-name.err
create mode 100644 tests/qapi-schema/features-missing-name.exit
create mode 100644 tests/qapi-schema/features-missing-name.out
create mode 100644 tests/qapi-schema/features-name-bad-type.err
create mode 100644 tests/qapi-schema/features-name-bad-type.exit
create mode 100644 tests/qapi-schema/features-name-bad-type.out
create mode 100644 tests/qapi-schema/features-no-list.err
create mode 100644 tests/qapi-schema/features-no-list.exit
create mode 100644 tests/qapi-schema/features-no-list.out
create mode 100644 tests/qapi-schema/features-unknown-key.err
create mode 100644 tests/qapi-schema/features-unknown-key.exit
create mode 100644 tests/qapi-schema/features-unknown-key.out
[Qemu-devel] [PATCH v4 0/6] file-posix: Add dynamic-auto-read-only QAPI feature
Posted by Kevin Wolf 4 years, 10 months ago
This series adds optional feature lists to struct definitions in the
QAPI schema and makes use of them to advertise the new behaviour of
auto-read-only=on in file-posix.

v4:
- Build fix for tests/test-qmp-cmds

v3:
- Added a command using the structs types to the positive test case
- Renamed QAPIDoc.SymbolPart to QAPIDoc.DocPart
- Applied requested comment changes
- Style fixes to avoid adding pycodestyle-3 complaints
- More stylistic changes to match Markus' taste better

v2:
- Check that features have well-formed names instead of just checking
  that they are strings
- Use QAPISchemaFeature objects instead of dicts
- Catch duplicate feature names (and test that a feature name doesn't
  conflict with an object member)
- Added patch 4 and 5 to add rudimentary support for features to
  QAPIDoc so it doesn't complain about the documentation format
  suggested by Markus. Used that format in the documentation of
  dynamic-auto-read-only.


Kevin Wolf (6):
  qapi: Add feature flags to struct types
  tests/qapi-schema: Test for good feature lists in structs
  tests/qapi-schema: Error case tests for features in structs
  qapi: Disentangle QAPIDoc code
  qapi: Allow documentation for features
  file-posix: Add dynamic-auto-read-only QAPI feature

 qapi/block-core.json                          |  13 +-
 qapi/introspect.json                          |   6 +-
 tests/qapi-schema/features-bad-type.json      |   3 +
 .../qapi-schema/features-duplicate-name.json  |   3 +
 tests/qapi-schema/features-missing-name.json  |   3 +
 tests/qapi-schema/features-name-bad-type.json |   3 +
 tests/qapi-schema/features-no-list.json       |   3 +
 tests/qapi-schema/features-unknown-key.json   |   3 +
 tests/qapi-schema/qapi-schema-test.json       |  39 +++
 docs/devel/qapi-code-gen.txt                  |  38 +++
 tests/test-qmp-cmds.c                         |   8 +
 scripts/qapi/common.py                        | 228 +++++++++++++++---
 scripts/qapi/doc.py                           |  15 +-
 scripts/qapi/introspect.py                    |   6 +-
 scripts/qapi/types.py                         |   3 +-
 scripts/qapi/visit.py                         |   3 +-
 tests/Makefile.include                        |   6 +
 tests/qapi-schema/double-type.err             |   2 +-
 tests/qapi-schema/features-bad-type.err       |   1 +
 tests/qapi-schema/features-bad-type.exit      |   1 +
 tests/qapi-schema/features-bad-type.out       |   0
 tests/qapi-schema/features-duplicate-name.err |   1 +
 .../qapi-schema/features-duplicate-name.exit  |   1 +
 tests/qapi-schema/features-duplicate-name.out |   0
 tests/qapi-schema/features-missing-name.err   |   1 +
 tests/qapi-schema/features-missing-name.exit  |   1 +
 tests/qapi-schema/features-missing-name.out   |   0
 tests/qapi-schema/features-name-bad-type.err  |   1 +
 tests/qapi-schema/features-name-bad-type.exit |   1 +
 tests/qapi-schema/features-name-bad-type.out  |   0
 tests/qapi-schema/features-no-list.err        |   1 +
 tests/qapi-schema/features-no-list.exit       |   1 +
 tests/qapi-schema/features-no-list.out        |   0
 tests/qapi-schema/features-unknown-key.err    |   2 +
 tests/qapi-schema/features-unknown-key.exit   |   1 +
 tests/qapi-schema/features-unknown-key.out    |   0
 tests/qapi-schema/qapi-schema-test.out        |  43 ++++
 tests/qapi-schema/test-qapi.py                |   7 +-
 tests/qapi-schema/unknown-expr-key.err        |   2 +-
 39 files changed, 403 insertions(+), 47 deletions(-)
 create mode 100644 tests/qapi-schema/features-bad-type.json
 create mode 100644 tests/qapi-schema/features-duplicate-name.json
 create mode 100644 tests/qapi-schema/features-missing-name.json
 create mode 100644 tests/qapi-schema/features-name-bad-type.json
 create mode 100644 tests/qapi-schema/features-no-list.json
 create mode 100644 tests/qapi-schema/features-unknown-key.json
 create mode 100644 tests/qapi-schema/features-bad-type.err
 create mode 100644 tests/qapi-schema/features-bad-type.exit
 create mode 100644 tests/qapi-schema/features-bad-type.out
 create mode 100644 tests/qapi-schema/features-duplicate-name.err
 create mode 100644 tests/qapi-schema/features-duplicate-name.exit
 create mode 100644 tests/qapi-schema/features-duplicate-name.out
 create mode 100644 tests/qapi-schema/features-missing-name.err
 create mode 100644 tests/qapi-schema/features-missing-name.exit
 create mode 100644 tests/qapi-schema/features-missing-name.out
 create mode 100644 tests/qapi-schema/features-name-bad-type.err
 create mode 100644 tests/qapi-schema/features-name-bad-type.exit
 create mode 100644 tests/qapi-schema/features-name-bad-type.out
 create mode 100644 tests/qapi-schema/features-no-list.err
 create mode 100644 tests/qapi-schema/features-no-list.exit
 create mode 100644 tests/qapi-schema/features-no-list.out
 create mode 100644 tests/qapi-schema/features-unknown-key.err
 create mode 100644 tests/qapi-schema/features-unknown-key.exit
 create mode 100644 tests/qapi-schema/features-unknown-key.out

-- 
2.20.1


Re: [Qemu-devel] [PATCH v4 0/6] file-posix: Add dynamic-auto-read-only QAPI feature
Posted by Markus Armbruster 4 years, 10 months ago
Kevin Wolf <kwolf@redhat.com> writes:

> This series adds optional feature lists to struct definitions in the
> QAPI schema and makes use of them to advertise the new behaviour of
> auto-read-only=on in file-posix.

PATCH 1-3,5-6 are ready.  PATCH 4 could use a bit of love, but I think I
don't need you to respin.  Let's review the issues briefly:

(a) I found a few comment nits to pick.

(b) QAPIDoc._check_named_section() confused me.  I proposed to replace
    it by ._is_section_tag().

(c) I proposed to replace QAPIDoc._part by ._append_line.  Matter of
    taste.  I find it simpler.

I'd like to proceed as follows.  Since my follow-up patch for (b) is
pretty trivial and you haven't expressed a dislike for it, I'll squash
it in.  Since you do dislike my follow-up patch for (c), I'll keep it
separate, so you don't get blamed for it.  Any comment nits that survive
the two follow-up patches I'll address in the first one.  I'll post the
result as v5.

Okay?

Since PATCH 4 isn't actually wrong, series
Reviewed-by: Markus Armbruster <armbru@redhat.com>