From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm1Aw-0004kU-Ou for qemu-devel@nongnu.org; Fri, 21 Dec 2012 06:54:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm1Aq-00063F-SC for qemu-devel@nongnu.org; Fri, 21 Dec 2012 06:54:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm1Aq-000639-KQ for qemu-devel@nongnu.org; Fri, 21 Dec 2012 06:53:56 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBLBrtOF027289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Dec 2012 06:53:55 -0500 Message-ID: <50D44DD0.7030003@redhat.com> Date: Fri, 21 Dec 2012 12:53:52 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1355932747-1755-1-git-send-email-kraxel@redhat.com> <50D2ED39.6010608@redhat.com> <20121220105643.GK25577@redhat.com> <50D2F23D.9000908@redhat.com> <50D2FA5D.30602@redhat.com> <50D30C7B.3030802@redhat.com> <50D44BD5.8040003@redhat.com> In-Reply-To: <50D44BD5.8040003@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RfC 0/9] chardev hotplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Michal Privoznik , qemu-devel@nongnu.org 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