From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com,
mdroth@linux.vnet.ibm.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH RFC 3/3] tests: add test cases for qapi event support
Date: Mon, 16 Dec 2013 11:12:50 +0800 [thread overview]
Message-ID: <52AE6FB2.4070002@linux.vnet.ibm.com> (raw)
In-Reply-To: <52AE6BA0.4000207@linux.vnet.ibm.com>
于 2013/12/16 10:55, Wenchao Xia 写道:
> 于 2013/12/13 21:36, Eric Blake 写道:
>> On 11/12/2013 06:44 PM, Wenchao Xia wrote:
>>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>>> ---
>>
>>> +++ b/tests/qapi-schema/qapi-schema-test.json
>>> @@ -93,3 +93,15 @@
>>> '*u16' : [ 'uint16' ],
>>> '*i64x': 'int' ,
>>> '*u64x': 'uint64' } }
>>> +
>>> +# testing event
>>> +{ 'type': 'EventStructOne',
>>> + 'data': { 'struct1': 'UserDefOne', 'string': 'str', '*enum2':
>>> 'EnumOne' } }
>>> +
>>> +{ 'event': 'EVENT_A' }
>>> +{ 'event': 'EVENT_B',
>>> + 'data': { } }
>>
>> Do we really have events with no associated information (the mere name
>> of the event carrying the full data?)
>>
>
> I guess EVENT_SHUDDOWN is one example, that have no associated info,
> except time stamp.
>
I think you questioned why EVENT_B is needed? I added it before to
allow that, both define can work.
>
>>> +{ 'event': 'EVENT_C',
>>> + 'data': { '*a': 'int', '*b': 'UserDefOne', 'c': 'str' } }
>>> +{ 'event': 'EVENT_D',
>>> + 'data': { 'a' : 'EventStructOne', 'b' : 'str', '*c': 'str',
>>> '*enum3': 'EnumOne' } }
>>
>> Looks like reasonable support for encoding existing events.
>>
>>> + OrderedDict([('event', 'EVENT_A')]),
>>> + OrderedDict([('event', 'EVENT_B'), ('data', OrderedDict())]),
>>
>> Shouldn't the omission of 'data' be the same as 'data':{}?
>>
>
> I didn't touch the "{ }" parsing part, maybe an existing parsing
> style, will check it.
>
>>> +++ b/tests/test-qmp-event.c
>>> @@ -0,0 +1,250 @@
>>> +/*
>>> + * QMP Input Visitor unit-tests.
>>> + *
>>> + * Copyright (C) 2011 Red Hat Inc.
>>
>> Unusual choice of copyright year and ownership.
>>
> yep, will fix.
>
>
next prev parent reply other threads:[~2013-12-16 3:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 1:44 [Qemu-devel] [PATCH RFC 0/3] add direct support of event in qapi schema Wenchao Xia
2013-11-13 1:44 ` [Qemu-devel] [PATCH RFC 1/3] os-posix: include sys/time.h Wenchao Xia
2013-12-13 13:26 ` Eric Blake
2013-11-13 1:44 ` [Qemu-devel] [PATCH RFC 2/3] qapi script: add support of event Wenchao Xia
2013-11-28 0:48 ` Luiz Capitulino
2013-11-28 7:16 ` Wenchao Xia
2013-11-28 14:31 ` Luiz Capitulino
2013-12-02 6:48 ` Wenchao Xia
2013-12-13 3:00 ` Wenchao Xia
2013-12-13 13:31 ` Eric Blake
2013-12-13 13:43 ` Kevin Wolf
2013-12-16 2:50 ` Wenchao Xia
2013-12-16 9:04 ` Markus Armbruster
2013-12-16 9:13 ` Markus Armbruster
2014-01-07 12:14 ` Markus Armbruster
2014-01-13 10:08 ` Markus Armbruster
2014-01-15 1:47 ` Wenchao Xia
2014-01-16 2:50 ` Michael Roth
2014-01-16 11:05 ` Paolo Bonzini
2014-01-30 10:35 ` Markus Armbruster
2013-12-16 2:51 ` Wenchao Xia
2013-11-13 1:44 ` [Qemu-devel] [PATCH 2/2] try Wenchao Xia
2013-11-13 1:47 ` Wenchao Xia
2013-11-13 1:44 ` [Qemu-devel] [PATCH RFC 3/3] tests: add test cases for qapi event support Wenchao Xia
2013-12-13 13:36 ` Eric Blake
2013-12-16 2:55 ` Wenchao Xia
2013-12-16 3:12 ` Wenchao Xia [this message]
2014-01-02 2:30 ` Wenchao Xia
2013-11-22 2:03 ` [Qemu-devel] [PATCH RFC 0/3] add direct support of event in qapi schema Wenchao Xia
2013-11-22 14:33 ` 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=52AE6FB2.4070002@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.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.