Skip to content

Create an include directive for QAPI JSON files

Benoît Canet qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v23 patches 6 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3test-qapi: Make test-qapi.py spit useful error messages.tests/qapi-schema/test-qapi.py+2 -20 replies
2/3qapi: Change the qapi scripts to take their input as first argument.Makefile scripts/qapi-commands.py scripts/qapi-types.py +21 more+64 -400 replies
3/3qapi: Create an include directive for use in the JSON description files.docs/qapi-code-gen.txt scripts/qapi.py tests/Makefile +32 more+128 -31 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchEric Blake
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH V3 0/3] Create an include directive for QAPI JSON files

The first patch make an error path in the test more explicit.

The second make the qapi generator script take their input as non option argument. It's done to be able to do cycle detection in the next patch.

The third create an include directive for QAPI JSON files.

The purpose of this series is to be able to add QMP to qemu-nbd in a not so distant future.

Best regards

Benoît

in v3:
replace path by filename [Markus]
Don't print only filename on error [Markus]
filter filename path prefix on the test Makefile [Markus] rework the python script arguments handling [Markus] Error out in test-qapi.py if no argument is provided [Markus] Fix Makefile rules [Markus]
Add tests [Eric]
Print out path to include loop [Markus]

in V2:
Split second patch in two patches [Eric]
Document in docs/qapi-code-gen.txt [Eric]

Benoît Canet (3):
test-qapi: Make test-qapi.py spit useful error messages.
qapi: Change the qapi scripts to take their input as first argument.
qapi: Create an include directive for use in the JSON description
files.

 Makefile                                           |   12 ++---
 docs/qapi-code-gen.txt                             |   14 +++++
 scripts/qapi-commands.py                           |    6 ++-
 scripts/qapi-types.py                              |    6 ++-
 scripts/qapi-visit.py                              |    6 ++-
 scripts/qapi.py                                    |   56 +++++++++++++++++---
 tests/Makefile                                     |   22 +++++---
 tests/qapi-schema/duplicate-key.err                |    2 +-
 .../qapi-schema/error_after_sucessful_include.err  |    1 +
 .../qapi-schema/error_after_sucessful_include.exit |    1 +
 .../qapi-schema/error_after_sucessful_include.json |    4 ++
 tests/qapi-schema/error_in_included_file.err       |    1 +
 tests/qapi-schema/error_in_included_file.exit      |    1 +
 tests/qapi-schema/error_in_included_file.json      |    4 ++
 .../qapi-schema/flat-union-invalid-branch-key.err  |    2 +-
 .../flat-union-invalid-discriminator.err           |    2 +-
 tests/qapi-schema/flat-union-no-base.err           |    2 +-
 .../flat-union-string-discriminator.err            |    2 +-
 tests/qapi-schema/funny-char.err                   |    2 +-
 tests/qapi-schema/include.exit                     |    1 +
 tests/qapi-schema/include.json                     |    4 ++
 tests/qapi-schema/include.out                      |    8 +++
 tests/qapi-schema/include/error.json               |    6 +++
 tests/qapi-schema/include/include.json             |    7 +++
 tests/qapi-schema/include/multi.json               |    1 +
 tests/qapi-schema/include/multi_loop.json          |    1 +
 tests/qapi-schema/include_loop.exit                |    1 +
 tests/qapi-schema/include_loop.json                |    1 +
 tests/qapi-schema/include_loop.out                 |    3 ++
 tests/qapi-schema/include_non_filename.err         |    1 +
 tests/qapi-schema/include_non_filename.exit        |    1 +
 tests/qapi-schema/include_non_filename.json        |    4 ++
 tests/qapi-schema/missing-colon.err                |    2 +-
 tests/qapi-schema/missing-comma-list.err           |    2 +-
 tests/qapi-schema/missing-comma-object.err         |    2 +-
 tests/qapi-schema/multi_file_loop_include.exit     |    1 +
 tests/qapi-schema/multi_file_loop_include.json     |    4 ++
 tests/qapi-schema/multi_file_loop_include.out      |    4 ++
 .../multiple_relative_path_include.exit            |    1 +
 .../multiple_relative_path_include.json            |    4 ++
 .../qapi-schema/multiple_relative_path_include.out |    6 +++
 tests/qapi-schema/non-objects.err                  |    2 +-
 tests/qapi-schema/quoted-structural-chars.err      |    2 +-
 tests/qapi-schema/test-qapi.py                     |   10 ++--
 tests/qapi-schema/trailing-comma-list.err          |    2 +-
 tests/qapi-schema/trailing-comma-object.err        |    2 +-
 tests/qapi-schema/unclosed-list.err                |    2 +-
 tests/qapi-schema/unclosed-object.err              |    2 +-
 tests/qapi-schema/unclosed-string.err              |    2 +-
 tests/qapi-schema/union-invalid-base.err           |    2 +-
 50 files changed, 193 insertions(+), 44 deletions(-)
 create mode 100644 tests/qapi-schema/error_after_sucessful_include.err
 create mode 100644 tests/qapi-schema/error_after_sucessful_include.exit
 create mode 100644 tests/qapi-schema/error_after_sucessful_include.json
 create mode 100644 tests/qapi-schema/error_after_sucessful_include.out
 create mode 100644 tests/qapi-schema/error_in_included_file.err
 create mode 100644 tests/qapi-schema/error_in_included_file.exit
 create mode 100644 tests/qapi-schema/error_in_included_file.json
 create mode 100644 tests/qapi-schema/error_in_included_file.out
 create mode 100644 tests/qapi-schema/include.err
 create mode 100644 tests/qapi-schema/include.exit
 create mode 100644 tests/qapi-schema/include.json
 create mode 100644 tests/qapi-schema/include.out
 create mode 100644 tests/qapi-schema/include/error.json
 create mode 100644 tests/qapi-schema/include/include.json
 create mode 100644 tests/qapi-schema/include/multi.json
 create mode 100644 tests/qapi-schema/include/multi_loop.json
 create mode 100644 tests/qapi-schema/include_loop.err
 create mode 100644 tests/qapi-schema/include_loop.exit
 create mode 100644 tests/qapi-schema/include_loop.json
 create mode 100644 tests/qapi-schema/include_loop.out
 create mode 100644 tests/qapi-schema/include_non_filename.err
 create mode 100644 tests/qapi-schema/include_non_filename.exit
 create mode 100644 tests/qapi-schema/include_non_filename.json
 create mode 100644 tests/qapi-schema/include_non_filename.out
 create mode 100644 tests/qapi-schema/multi_file_loop_include.err
 create mode 100644 tests/qapi-schema/multi_file_loop_include.exit
 create mode 100644 tests/qapi-schema/multi_file_loop_include.json
 create mode 100644 tests/qapi-schema/multi_file_loop_include.out
 create mode 100644 tests/qapi-schema/multiple_relative_path_include.err
 create mode 100644 tests/qapi-schema/multiple_relative_path_include.exit
 create mode 100644 tests/qapi-schema/multiple_relative_path_include.json
 create mode 100644 tests/qapi-schema/multiple_relative_path_include.out

--
1.7.10.4