From patchwork Mon May 8 19:57:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 9716587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1536760364 for ; Mon, 8 May 2017 19:58:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F39D205F8 for ; Mon, 8 May 2017 19:58:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02BCB25223; Mon, 8 May 2017 19:58:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15564205F8 for ; Mon, 8 May 2017 19:58:16 +0000 (UTC) Received: from localhost ([::1]:33237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7onP-0001gS-Cv for patchwork-qemu-devel@patchwork.kernel.org; Mon, 08 May 2017 15:58:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7omq-0001Zz-Kk for qemu-devel@nongnu.org; Mon, 08 May 2017 15:57:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7omn-00058p-HB for qemu-devel@nongnu.org; Mon, 08 May 2017 15:57:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39518) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7omn-00057G-7C for qemu-devel@nongnu.org; Mon, 08 May 2017 15:57:37 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D35D937E66; Mon, 8 May 2017 19:57:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D35D937E66 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D35D937E66 Received: from [10.10.122.86] (ovpn-122-86.rdu2.redhat.com [10.10.122.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id F27389F99D; Mon, 8 May 2017 19:57:32 +0000 (UTC) To: Stefan Hajnoczi , Markus Armbruster References: <1493966082-9352-1-git-send-email-armbru@redhat.com> <20170508164230.GD22428@stefanha-x1.localdomain> <79237b29-3f53-64c7-413a-4451562292ff@redhat.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <407b1b2a-d58f-256f-925a-02a5dce759d8@redhat.com> Date: Mon, 8 May 2017 14:57:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <79237b29-3f53-64c7-413a-4451562292ff@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 08 May 2017 19:57:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [Qemu-devel] [PULL v2 00/28] QAPI patches for 2017-05-04 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 05/08/2017 01:09 PM, Eric Blake wrote: > On 05/08/2017 11:42 AM, Stefan Hajnoczi wrote: >> On Fri, May 05, 2017 at 08:34:42AM +0200, Markus Armbruster wrote: >>> [v2]: Fix trailing space, note tweaks to PATCH 12 properly in the >>> >>> commit message >>> The following changes since commit e619b14746e5d8c0e53061661fd0e1da01fd4d60: >>> >>> Merge remote-tracking branch 'sthibault/tags/samuel-thibault' into staging (2017-05-02 15:16:29 +0100) >>> >>> are available in the git repository at: >>> >>> git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2017-05-04-v2 >> >> make check fails when I apply this series: >> >> GTESTER tests/test-char >> GTester: last random seed: R02S47a681e3e741223084711f7aacacb19a >> GTester: last random seed: R02S739de30ffeb0f93caedc22b2863f60a7 > > I tried bisecting, and I hit compilation failures during: > > sockets: Rename SocketAddress to SocketAddressLegacy > > chardev/char-socket.c: In function ‘qmp_chardev_open_socket’: > chardev/char-socket.c:948:13: error: implicit declaration of function > ‘qapi_free_SocketAddress’ [-Werror=implicit-function-declaration] > qapi_free_SocketAddress(s->addr); > ^~~~~~~~~~~~~~~~~~~~~~~ For this one, I got past by squashing in: case SOCKET_ADDRESS_LEGACY_KIND_INET: That was enough to get me back to a working 'make check'. diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 6b89209..1b99344 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -945,7 +945,7 @@ static void qmp_chardev_open_socket(Chardev *chr, goto error; } - qapi_free_SocketAddress(s->addr); + qapi_free_SocketAddressLegacy(s->addr); s->addr = socket_local_address(sioc->fd, errp); update_disconnected_filename(s); @@ -1051,7 +1051,7 @@ char_socket_get_addr(Object *obj, Visitor *v, const char *name, { SocketChardev *s = SOCKET_CHARDEV(obj); - visit_type_SocketAddress(v, name, &s->addr, errp); + visit_type_SocketAddressLegacy(v, name, &s->addr, errp); } static bool > > > and > sockets: Rename SocketAddressFlat to SocketAddress > > chardev/char-socket.c: In function ‘qmp_chardev_open_socket’: > chardev/char-socket.c:948:37: error: passing argument 1 of > ‘qapi_free_SocketAddress’ from incompatible pointer type > [-Werror=incompatible-pointer-types] > qapi_free_SocketAddress(s->addr); > ^ For this one, I squashed in: diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 69e6de6..8a321a1 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -945,7 +945,7 @@ static void qmp_chardev_open_socket(Chardev *chr, goto error; } - qapi_free_SocketAddressLegacy(s->addr); + qapi_free_SocketAddress(s->addr); s->addr = socket_local_address(sioc->fd, errp); update_disconnected_filename(s); @@ -1051,7 +1051,7 @@ char_socket_get_addr(Object *obj, Visitor *v, const char *name, { SocketChardev *s = SOCKET_CHARDEV(obj); - visit_type_SocketAddressLegacy(v, name, &s->addr, errp); + visit_type_SocketAddress(v, name, &s->addr, errp); } static bool diff --git a/tests/test-char.c b/tests/test-char.c index 773a1c3..124d0c5 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -291,7 +291,7 @@ static void char_socket_test(void) Chardev *chr = qemu_chr_new("server", "tcp:127.0.0.1:0,server,nowait"); Chardev *chr_client; QObject *addr; - QDict *qdict, *data; + QDict *qdict; const char *port; SocketIdleData d = { .chr = chr }; CharBackend be; @@ -306,8 +306,7 @@ static void char_socket_test(void) addr = object_property_get_qobject(OBJECT(chr), "addr", &error_abort); qdict = qobject_to_qdict(addr); - data = qdict_get_qdict(qdict, "data"); - port = qdict_get_str(data, "port"); + port = qdict_get_str(qdict, "port"); tmp = g_strdup_printf("tcp:127.0.0.1:%s", port); QDECREF(qdict); diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index ad3ce65..bee3646 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1369,7 +1369,12 @@ SocketAddressLegacy *socket_address_crumple(SocketAddress *addr_flat) SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy) { - SocketAddress *addr = g_new(SocketAddress, 1); + SocketAddress *addr; + + if (!addr_legacy) { + return NULL; + } + addr = g_new(SocketAddress, 1); switch (addr_legacy->type) {