qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests
@ 2014-03-10 14:54 Markus Armbruster
  2014-03-10 16:16 ` Luiz Capitulino
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2014-03-10 14:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, lcapitulino

Screwed up in commit 2fc0043.  Currently harmless, because the enum
values happen to be identical.

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;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests
  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
  2014-03-11  9:19   ` Markus Armbruster
  0 siblings, 1 reply; 4+ messages in thread
From: Luiz Capitulino @ 2014-03-10 16:16 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: peter.maydell, qemu-devel

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests
  2014-03-10 16:16 ` Luiz Capitulino
@ 2014-03-11  9:19   ` Markus Armbruster
  2014-03-11 13:13     ` Luiz Capitulino
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2014-03-11  9:19 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: peter.maydell, qemu-devel

Luiz Capitulino <lcapitulino@redhat.com> writes:

> 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

Conflicts because it fixes the bug silently.

If we want a record of the bug fix, we can either rebase his series on
top of mine, or amend one of his commit messages.  I'm not sure it's
worth the bother, though.  I can give it a try if you think it's
worthwhile.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests
  2014-03-11  9:19   ` Markus Armbruster
@ 2014-03-11 13:13     ` Luiz Capitulino
  0 siblings, 0 replies; 4+ messages in thread
From: Luiz Capitulino @ 2014-03-11 13:13 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: peter.maydell, qemu-devel

On Tue, 11 Mar 2014 10:19:20 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> Luiz Capitulino <lcapitulino@redhat.com> writes:
> 
> > 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
> 
> Conflicts because it fixes the bug silently.
> 
> If we want a record of the bug fix, we can either rebase his series on
> top of mine, or amend one of his commit messages.  I'm not sure it's
> worth the bother, though.  I can give it a try if you think it's
> worthwhile.

I don't think it is.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-11 13:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-03-11  9:19   ` Markus Armbruster
2014-03-11 13:13     ` Luiz Capitulino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).