qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 0/7] Validate and test qapi examples


From: Daniel P . Berrangé
Subject: Re: [PATCH v1 0/7] Validate and test qapi examples
Date: Wed, 6 Sep 2023 10:17:04 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

On Tue, Sep 05, 2023 at 09:48:39PM +0200, Victor Toso wrote:
> Hi,
> 
> This is a follow up from the RFC sent in the end of 08-2022:
>     https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04525.html
> 
> The generator code was rebased, without conflicts. The commit log was
> improved as per Markus suggestion [0], altough I'm sure it can be
> improved further.
> 
> To clarify, consuming the Examples as data for testing the qapi-go
> work has been very very helpful. I'm positive it can be of use for other
> bindings in the future, besides keeping the examples functional
> 
> Cheers,
> 
> [0] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04682.html
> 
> Victor Toso (7):
>   qapi: scripts: add a generator for qapi's examples
>   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/machine.json            |   2 +-
>  qapi/migration.json          |   6 +-
>  qapi/misc.json               |   2 +-
>  qapi/net.json                |   6 +-
>  scripts/qapi/dumpexamples.py | 194 +++++++++++++++++++++++++++++++++++
>  scripts/qapi/main.py         |   2 +
>  6 files changed, 204 insertions(+), 8 deletions(-)
>  create mode 100644 scripts/qapi/dumpexamples.py

After applying this series, aside from the extra broken examples
mentioned in my patch 1 comments, I also see a test suite failure
during build

FAILED: tests/qapi-builtin-types.c tests/qapi-builtin-types.h 
tests/qapi-builtin-visit.c tests/qapi-builtin-visit.h 
tests/test-qapi-commands-sub-sub-module.c 
tests/test-qapi-commands-sub-sub-module.h tests/test-qapi-commands.c 
tests/test-qapi-commands.h tests/test-qapi-emit-events.c 
tests/test-qapi-emit-events.h tests/test-qapi-events-sub-sub-module.c 
tests/test-qapi-events-sub-sub-module.h tests/test-qapi-events.c 
tests/test-qapi-events.h tests/test-qapi-init-commands.c 
tests/test-qapi-init-commands.h tests/test-qapi-introspect.c 
tests/test-qapi-introspect.h tests/test-qapi-types-sub-sub-module.c 
tests/test-qapi-types-sub-sub-module.h tests/test-qapi-types.c 
tests/test-qapi-types.h tests/test-qapi-visit-sub-sub-module.c 
tests/test-qapi-visit-sub-sub-module.h tests/test-qapi-visit.c 
tests/test-qapi-visit.h 
/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 
/home/berrange/src/virt/qemu/scripts/qapi-gen.py -o 
/home/berrange/src/virt/qemu/build/tests -b -p test- 
../tests/qapi-schema/qapi-schema-test.json --suppress-tracing
Traceback (most recent call last):
  File "/home/berrange/src/virt/qemu/scripts/qapi-gen.py", line 19, in <module>
    sys.exit(main.main())
             ^^^^^^^^^^^
  File "/home/berrange/src/virt/qemu/scripts/qapi/main.py", line 96, in main
    generate(args.schema,
  File "/home/berrange/src/virt/qemu/scripts/qapi/main.py", line 58, in generate
    gen_examples(schema, output_dir, prefix)
  File "/home/berrange/src/virt/qemu/scripts/qapi/dumpexamples.py", line 40, in 
gen_examples
    schema.visit(vis)
  File "/home/berrange/src/virt/qemu/scripts/qapi/schema.py", line 1227, in 
visit
    mod.visit(visitor)
  File "/home/berrange/src/virt/qemu/scripts/qapi/schema.py", line 209, in visit
    entity.visit(visitor)
  File "/home/berrange/src/virt/qemu/scripts/qapi/schema.py", line 857, in visit
    visitor.visit_command(
  File "/home/berrange/src/virt/qemu/scripts/qapi/dumpexamples.py", line 184, 
in visit_command
    parse_examples_of(self, name)
  File "/home/berrange/src/virt/qemu/scripts/qapi/dumpexamples.py", line 118, 
in parse_examples_of
    assert((obj.doc is not None))
            ^^^^^^^^^^^^^^^^^^^
AssertionError
ninja: build stopped: subcommand failed.


not sure if that's related to the examples that still need fixing or not ?

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]