From: Luiz Capitulino <lcapitulino@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests
Date: Mon, 10 Mar 2014 12:16:42 -0400 [thread overview]
Message-ID: <20140310121642.3a28896e@redhat.com> (raw)
In-Reply-To: <1394463290-24929-1-git-send-email-armbru@redhat.com>
On Mon, 10 Mar 2014 15:54:50 +0100
Markus Armbruster <armbru@redhat.com> wrote:
> Screwed up in commit 2fc0043. Currently harmless, because the enum
> values happen to be identical.
I'm afraid this conflicts with Wenchao's series:
[PATCH V9 00/10] qapi script: support enum as discriminator and better enum name
Which is already merged in my qmp queue:
git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> tests/test-qmp-input-visitor.c | 2 +-
> tests/test-qmp-output-visitor.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
> index 2dffafc..0b9256b 100644
> --- a/tests/test-qmp-input-visitor.c
> +++ b/tests/test-qmp-input-visitor.c
> @@ -315,7 +315,7 @@ static void test_visitor_in_union_flat(TestInputVisitorData *data,
>
> visit_type_UserDefFlatUnion(v, &tmp, NULL, &err);
> g_assert(err == NULL);
> - g_assert_cmpint(tmp->kind, ==, USER_DEF_UNION_KIND_A);
> + g_assert_cmpint(tmp->kind, ==, USER_DEF_FLAT_UNION_KIND_A);
> /* TODO g_assert_cmpint(tmp->integer, ==, 41); */
> g_assert_cmpint(tmp->a->boolean, ==, true);
> qapi_free_UserDefFlatUnion(tmp);
> diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c
> index 105f4cf..603616a 100644
> --- a/tests/test-qmp-output-visitor.c
> +++ b/tests/test-qmp-output-visitor.c
> @@ -449,7 +449,7 @@ static void test_visitor_out_union_flat(TestOutputVisitorData *data,
> Error *err = NULL;
>
> UserDefFlatUnion *tmp = g_malloc0(sizeof(UserDefFlatUnion));
> - tmp->kind = USER_DEF_UNION_KIND_A;
> + tmp->kind = USER_DEF_FLAT_UNION_KIND_A;
> tmp->a = g_malloc0(sizeof(UserDefA));
> /* TODO when generator bug is fixed: tmp->integer = 41; */
> tmp->a->boolean = true;
next prev parent reply other threads:[~2014-03-10 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 14:54 [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests Markus Armbruster
2014-03-10 16:16 ` Luiz Capitulino [this message]
2014-03-11 9:19 ` Markus Armbruster
2014-03-11 13:13 ` Luiz Capitulino
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=20140310121642.3a28896e@redhat.com \
--to=lcapitulino@redhat.com \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.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.