From nobody Tue Feb 10 03:39:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1563028511; cv=none; d=zoho.com; s=zohoarc; b=MBHvs60Nowv9zsYboEWxBRQ9lx9m+Y9GXI55xO8P7V7eo8GOU96cUZawalSfyU+I0P7BXI/Mdr5iwUYP3uHCC1e9JgKPeZ6SWXSZn3NKPwmeVOzB88kgm13BJu2yX4JGvJMNEhsEPUsIQipbTih09opibrTwfjehkwALoRDQ1iM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563028511; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=LD+ntom+xfOT7IexYPj81WC0aMowEWDYMoM6hRv7nUQ=; b=h7Q0Omkn0oBaOz2xVj7y/WwEXY+XVmYPa15CXlbEB21ZXn2aosjDNGL1sDxeeGREHw81NzHTLGhBWoHqJZ58RxEYY8kErslZOfq+GyHoHAB714LETgGGy6HZzbMl/XwNxMqkYAIv597hAQoYY0Fpa49I7h1NmJ6F5wqNNA1lNV4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1563028511834682.4197389375098; Sat, 13 Jul 2019 07:35:11 -0700 (PDT) Received: from localhost ([::1]:56600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmJ7G-0003Ua-BC for importer@patchew.org; Sat, 13 Jul 2019 10:35:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46830) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmJ6m-000277-RR for qemu-devel@nongnu.org; Sat, 13 Jul 2019 10:34:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmJ6l-0007nK-Qf for qemu-devel@nongnu.org; Sat, 13 Jul 2019 10:34:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hmJ6l-0007mE-HO for qemu-devel@nongnu.org; Sat, 13 Jul 2019 10:34:39 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC80F3082E57; Sat, 13 Jul 2019 14:34:38 +0000 (UTC) Received: from localhost (ovpn-112-50.ams2.redhat.com [10.36.112.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CF83196E5; Sat, 13 Jul 2019 14:34:30 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Sat, 13 Jul 2019 18:33:11 +0400 Message-Id: <20190713143311.17620-7-marcandre.lureau@redhat.com> In-Reply-To: <20190713143311.17620-1-marcandre.lureau@redhat.com> References: <20190713143311.17620-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Sat, 13 Jul 2019 14:34:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 6/6] test: skip tests if socket_check_protocol_support() failed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Skip the tests if socket_check_protocol_support() failed, but do run g_test_run() to keep TAP harness happy. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/test-char.c | 4 +++- tests/test-io-channel-socket.c | 4 +++- tests/test-util-sockets.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index 2dde620afc..b56e43c1eb 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -1365,7 +1365,8 @@ int main(int argc, char **argv) g_test_init(&argc, &argv, NULL); =20 if (socket_check_protocol_support(&has_ipv4, &has_ipv6) < 0) { - return -1; + g_printerr("socket_check_protocol_support() failed\n"); + goto end; } =20 module_call_init(MODULE_INIT_QOM); @@ -1465,5 +1466,6 @@ int main(int argc, char **argv) g_test_add_func("/char/hotswap", char_hotswap_test); g_test_add_func("/char/websocket", char_websock_test); =20 +end: return g_test_run(); } diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c index d2053c464c..d172f3070f 100644 --- a/tests/test-io-channel-socket.c +++ b/tests/test-io-channel-socket.c @@ -566,7 +566,8 @@ int main(int argc, char **argv) * with either IPv4 or IPv6 disabled. */ if (socket_check_protocol_support(&has_ipv4, &has_ipv6) < 0) { - return 1; + g_printerr("socket_check_protocol_support() failed\n"); + goto end; } =20 if (has_ipv4) { @@ -595,5 +596,6 @@ int main(int argc, char **argv) test_io_channel_unix_listen_cleanup); #endif /* _WIN32 */ =20 +end: return g_test_run(); } diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index f1ebffee5a..e2a3a8a093 100644 --- a/tests/test-util-sockets.c +++ b/tests/test-util-sockets.c @@ -242,7 +242,8 @@ int main(int argc, char **argv) * with either IPv4 or IPv6 disabled. */ if (socket_check_protocol_support(&has_ipv4, &has_ipv6) < 0) { - return 1; + g_printerr("socket_check_protocol_support() failed\n"); + goto end; } =20 if (has_ipv4) { @@ -264,5 +265,6 @@ int main(int argc, char **argv) test_socket_fd_pass_num_nocli); } =20 +end: return g_test_run(); } --=20 2.22.0.428.g6d5b264208