Skip to content

Validate and test qapi examples

Victor Toso qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 4 repliesIn review
  2. v211 patches 7 repliesSuperseded
  3. v17 patches 14 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10qapi: fix example of get-win32-socket commandqapi/misc.json+1 -10 replies
2/10qapi: fix example of dumpdtb commandqapi/machine.json+1 -10 replies
3/10qapi: fix example of cancel-vcpu-dirty-limit commandqapi/migration.json+1 -10 replies
4/10qapi: fix example of set-vcpu-dirty-limit commandqapi/migration.json+1 -10 replies
5/10qapi: fix example of calc-dirty-rate commandqapi/migration.json+1 -10 replies
6/10qapi: fix example of NETDEV_STREAM_CONNECTED eventqapi/net.json+3 -30 replies
7/10qapi: fix example of query-blockstats commandqapi/block-core.json+16 -160 replies
8/10qapi: fix example of query-rocker-of-dpa-flows commandqapi/rocker.json+1 -20 replies
9/10qapi: fix example of query-spice commandqapi/ui.json+1 -20 replies
10/10qapi: scripts: add a generator for qapi's examplesscripts/qapi/dumpexamples.py scripts/qapi/main.py+210 -13 replies

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by.

PatchDaniel P. BerrangéMarkus Armbruster
1/10R-b R-b
2/10R-b R-b
3/10R-b R-b
4/10R-b R-b
5/10R-b R-b
6/10R-b R-b
7/10R-b R-b
8/10R-b
9/10R-b
10/10

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

Read the v3 thread

Cover letter [PATCH v3 00/10] Validate and test qapi examples

Hi,

v2: https://lists.gnu.org/archive/html/qemu-devel/2023-09/msg02383.html

- Sorry Markus, I kept the two last 'fix example' patches as I don't fully remember how we should go with it. Not taking them but taking the generator would be bad as we would fail the build.

- Removed the meson flag suggested by Philippe to take the pragma suggestion from Markus, the interesting diff is:

--- a/scripts/qapi/dumpexamples.py
+++ b/scripts/qapi/dumpexamples.py
@@ -119,6 +119,10 @@ def parse_examples_of(self: QAPISchemaGenExamplesVisitor,

assert(name in self.schema._entity_dict)
obj = self.schema._entity_dict[name]
+
+ if not obj.info.pragma.doc_required:
+ return
+
assert((obj.doc is not None))
module_name = obj._module.name

which avoid failures with tests that don't have any docs.

Cheers,
Victor

Victor Toso (10):
qapi: fix example of get-win32-socket command
qapi: fix example of dumpdtb command
qapi: fix example of cancel-vcpu-dirty-limit command
qapi: fix example of set-vcpu-dirty-limit command
qapi: fix example of calc-dirty-rate command
qapi: fix example of NETDEV_STREAM_CONNECTED event
qapi: fix example of query-blockstats command
qapi: fix example of query-rocker-of-dpa-flows command
qapi: fix example of query-spice command
qapi: scripts: add a generator for qapi's examples

 qapi/block-core.json         |  32 +++---
 qapi/machine.json            |   2 +-
 qapi/migration.json          |   6 +-
 qapi/misc.json               |   2 +-
 qapi/net.json                |   6 +-
 qapi/rocker.json             |   3 +-
 qapi/ui.json                 |   3 +-
 scripts/qapi/dumpexamples.py | 208 +++++++++++++++++++++++++++++++++++
 scripts/qapi/main.py         |   3 +-
 9 files changed, 236 insertions(+), 29 deletions(-)
 create mode 100644 scripts/qapi/dumpexamples.py
Signature · 1 line
2.41.0