qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug
Date: Fri, 21 Dec 2012 12:53:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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 } }

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]