From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: pkrempa@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/6] tests/qapi-schema: Test for good feature lists in structs
Date: Mon, 3 Jun 2019 09:36:33 +0200 [thread overview]
Message-ID: <20190603073633.GA6523@linux.fritz.box> (raw)
In-Reply-To: <87a7ezuqfc.fsf@dusky.pond.sub.org>
Am 03.06.2019 um 08:35 hat Markus Armbruster geschrieben:
> Kevin Wolf <kwolf@redhat.com> writes:
>
> > Am 24.05.2019 um 15:29 hat Markus Armbruster geschrieben:
> >> Let's add
> >>
> >> { 'command': 'test-features',
> >> 'data': { 'fs0': 'FeatureStruct0',
> >> 'fs1': 'FeatureStruct1',
> >> 'fs2': 'FeatureStruct2',
> >> 'fs3': 'FeatureStruct3',
> >> 'cfs1': 'CondFeatureStruct1',
> >> 'cfs2': 'CondFeatureStruct2',
> >> 'cfs3': 'CondFeatureStruct3' } }
> >>
> >> because without it, the feature test cases won't generate introspection
> >> code.
> >
> > Of course, like everything else you requested, I'll just do this to get
> > the series off my table, but I'm still curious: Where would
> > introspection code ever be generated for the test cases? I saw neither
> > test code that generates the source files nor reference output that it
> > would be compared against.
>
> Asking me to explain why I want something done when you can't see it
> yourself is much, much better than blindly implementing it.
Well, adding a command can't hurt anyway, so doing both in parallel
seemed like a good option. :-)
> Makefile.include feeds the two positive tests qapi-schema-test.json and
> doc-good.json to qapi-gen.py.
>
> The .o for the former's .c get linked into a bunch of tests via Make
> variable $(test-qapi-obj-y). One of them is test-qobject-input-visitor.
> Its test case "/visitor/input/qapi-introspect" checks the generated
> QObject conforms to the schema.
>
> qapi-schema.json gets tested end-to-end instead: qmp-cmd-tests tests
> query-qmp-schema.
>
> Both tests only check schema conformance, they don't compare to expected
> output. Perhaps they should. But I can still diff the generated
> qmp-introspect.c manually, which I routinely do when messing with the
> generator.
>
> Makes sense?
Ah, so basically we don't fully check the correctness of the
introspection output, but just that two different generated files are
consistent with each other. Yes, makes sense.
I just didn't realise that the generated code is actually compiled and
linked to some other test cases. My expectation was the schema testing
was only in tests/qapi-schema/.
Kevin
next prev parent reply other threads:[~2019-06-03 7:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 14:42 [Qemu-devel] [PATCH v2 0/6] file-posix: Add dynamic-auto-read-only QAPI feature Kevin Wolf
2019-05-17 14:42 ` [Qemu-devel] [PATCH v2 1/6] qapi: Support features for structs Kevin Wolf
2019-05-24 13:20 ` Markus Armbruster
2019-05-24 14:50 ` Eric Blake
2019-05-17 14:42 ` [Qemu-devel] [PATCH v2 2/6] tests/qapi-schema: Test for good feature lists in structs Kevin Wolf
2019-05-24 13:29 ` Markus Armbruster
2019-05-29 22:09 ` Kevin Wolf
2019-06-03 6:35 ` Markus Armbruster
2019-06-03 7:36 ` Kevin Wolf [this message]
2019-05-17 14:42 ` [Qemu-devel] [PATCH v2 3/6] tests/qapi-schema: Error case tests for features " Kevin Wolf
2019-05-17 14:42 ` [Qemu-devel] [PATCH v2 4/6] qapi: Disentangle QAPIDoc code Kevin Wolf
2019-05-24 16:11 ` Markus Armbruster
2019-05-29 22:09 ` Kevin Wolf
2019-06-03 8:09 ` Markus Armbruster
2019-05-17 14:42 ` [Qemu-devel] [PATCH v2 5/6] qapi: Allow documentation for features Kevin Wolf
2019-05-27 8:02 ` Markus Armbruster
2019-05-17 14:42 ` [Qemu-devel] [PATCH v2 6/6] file-posix: Add dynamic-auto-read-only QAPI feature Kevin Wolf
2019-05-24 16:27 ` [Qemu-devel] [PATCH v2 0/6] " Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603073633.GA6523@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.