[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug |
Date: |
Fri, 21 Dec 2012 13:17:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121116 Thunderbird/10.0.11 |
On 12/21/12 12:53, Paolo Bonzini wrote:
> Il 21/12/2012 12:45, Gerd Hoffmann ha scritto:
>> On 12/20/12 14:02, Gerd Hoffmann wrote:
>>> Hi,
>>>
>>>> /me wades through the socket code (unix+tcp) right now, which needs some
>>>> refactoring to make it fly.
>>>
>>> Sneak preview attached. Goes on top of the series.
>>> Compile tested only so far.
>>
>> Now that it comes to testing: how does the union look (in josn) at the wire?
>
> Tests are your friends! (Especially qapi-schema-test.json and
> test-qmp-input-visitor.c). Something like this:
>
> { 'type': 'UserDefA',
> 'data': { 'boolean': 'bool' } }
>
> { 'type': 'UserDefB',
> 'data': { 'integer': 'int' } }
>
> { 'union': 'UserDefUnion',
> 'data': { 'a' : 'UserDefA', 'b' : 'UserDefB' } }
>
> looks like this:
>
> { 'type': 'b', 'data' : { 'integer': 42 } }
So ...
{ 'type': 'ChardevDummy', 'data': { } }
{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
'port' : 'ChardevPort',
'socket' : 'ChardevSocket',
'pty' : 'ChardevDummy',
'null' : 'ChardevDummy' } }
{ 'command': 'chardev-add', 'data': {'id' : 'str',
'backend' : 'ChardevBackend' },
... should accept ...
{'id': 'test-null', 'backend': {'data': {}, 'type': 'null'}}
... as parameters for chardev-add, no? But I get back ...
{u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter
'backend'"}}
... and can't see what is wrong there ...
cheers,
Gerd
- [Qemu-devel] [PATCH 3/9] chardev: reduce chardev ifdef mess a bit, (continued)
- [Qemu-devel] [PATCH 3/9] chardev: reduce chardev ifdef mess a bit, Gerd Hoffmann, 2012/12/19
- [Qemu-devel] [PATCH 5/9] chardev: hotplug, hmp, Gerd Hoffmann, 2012/12/19
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Michal Privoznik, 2012/12/20
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Daniel P. Berrange, 2012/12/20
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Paolo Bonzini, 2012/12/20
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Gerd Hoffmann, 2012/12/20
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Gerd Hoffmann, 2012/12/20
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Gerd Hoffmann, 2012/12/21
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Paolo Bonzini, 2012/12/21
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Paolo Bonzini, 2012/12/21
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Gerd Hoffmann, 2012/12/21
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Daniel P. Berrange, 2012/12/20
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Gerd Hoffmann, 2012/12/21
- Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug, Daniel P. Berrange, 2012/12/21