From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/3] qapi-schema: test: add a qapi-schema-test for array alternates
Date: Tue, 22 Mar 2022 10:46:21 +0100 [thread overview]
Message-ID: <87a6dijp5e.fsf@pond.sub.org> (raw)
In-Reply-To: <20220321164243.200569-3-pbonzini@redhat.com> (Paolo Bonzini's message of "Mon, 21 Mar 2022 17:42:42 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> Check that conflicts among array alternates are detected correctly.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> tests/qapi-schema/alternate-conflict-lists.err | 2 ++
> tests/qapi-schema/alternate-conflict-lists.json | 6 +++++
> tests/qapi-schema/alternate-conflict-lists.out | 0
> tests/qapi-schema/meson.build | 1 +
> 4 files changed, 8 insertions(+)
> create mode 100644 tests/qapi-schema/alternate-conflict-lists.err
> create mode 100644 tests/qapi-schema/alternate-conflict-lists.json
> create mode 100644 tests/qapi-schema/alternate-conflict-lists.out
>
> diff --git a/tests/qapi-schema/alternate-conflict-lists.err b/tests/qapi-schema/alternate-conflict-lists.err
> new file mode 100644
> index 0000000000..288b75a2ff
> --- /dev/null
> +++ b/tests/qapi-schema/alternate-conflict-lists.err
> @@ -0,0 +1,2 @@
> +alternate-conflict-lists.json: In alternate 'Alt':
> +alternate-conflict-lists.json:5: branch 'two' can't be distinguished from 'one'
Needs a trivial fixup:
-alternate-conflict-lists.json:5: branch 'two' can't be distinguished from 'one'
+alternate-conflict-lists.json:4: branch 'two' can't be distinguished from 'one'
Happy to apply it in my tree.
> diff --git a/tests/qapi-schema/alternate-conflict-lists.json b/tests/qapi-schema/alternate-conflict-lists.json
> new file mode 100644
> index 0000000000..90710da115
> --- /dev/null
> +++ b/tests/qapi-schema/alternate-conflict-lists.json
> @@ -0,0 +1,6 @@
> +# Two lists conflict even if their inner types would be compatible
> +{ 'struct': 'One',
> + 'data': { 'name': 'str' } }
> +{ 'alternate': 'Alt',
> + 'data': { 'one': [ 'int' ],
> + 'two': [ 'str' ] } }
> diff --git a/tests/qapi-schema/alternate-conflict-lists.out b/tests/qapi-schema/alternate-conflict-lists.out
> new file mode 100644
> index 0000000000..e69de29bb2
> diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
> index caf0791ba8..c18dd7d02f 100644
> --- a/tests/qapi-schema/meson.build
> +++ b/tests/qapi-schema/meson.build
> @@ -11,6 +11,7 @@ schemas = [
> 'alternate-conflict-dict.json',
> 'alternate-conflict-enum-bool.json',
> 'alternate-conflict-enum-int.json',
> + 'alternate-conflict-lists.json',
> 'alternate-conflict-string.json',
> 'alternate-conflict-bool-string.json',
> 'alternate-conflict-num-string.json',
With the fixup:
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2022-03-22 9:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 16:42 [PATCH 0/3] qapi-schema: support alternates with array type Paolo Bonzini
2022-03-21 16:42 ` [PATCH 1/3] " Paolo Bonzini
2022-03-22 9:48 ` Markus Armbruster
2022-04-18 14:52 ` Paolo Bonzini
2022-03-21 16:42 ` [PATCH 2/3] qapi-schema: test: add a qapi-schema-test for array alternates Paolo Bonzini
2022-03-22 9:46 ` Markus Armbruster [this message]
2022-03-21 16:42 ` [PATCH 3/3] qapi-schema: test: add a unit test for parsing " Paolo Bonzini
2022-03-22 9:47 ` Markus Armbruster
2022-04-04 12:13 ` [PATCH 0/3] qapi-schema: support alternates with array type Markus Armbruster
2022-04-18 14:50 ` Paolo Bonzini
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=87a6dijp5e.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--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.