From patchwork Wed Aug 30 16:52:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 807734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xjBd00xr1z9s7C for ; Thu, 31 Aug 2017 03:02:12 +1000 (AEST) Received: from localhost ([::1]:51662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dn6NV-0001C5-Qi for incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 13:02:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dn6F9-0001ZN-3q for qemu-devel@nongnu.org; Wed, 30 Aug 2017 12:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dn6F6-00053U-KS for qemu-devel@nongnu.org; Wed, 30 Aug 2017 12:53:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60564) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dn6F6-00052w-BA for qemu-devel@nongnu.org; Wed, 30 Aug 2017 12:53:28 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4AECE7EA8C; Wed, 30 Aug 2017 16:53:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4AECE7EA8C Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com Received: from localhost (ovpn-116-210.ams2.redhat.com [10.36.116.210]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B117517AE3; Wed, 30 Aug 2017 16:53:26 +0000 (UTC) From: Cornelia Huck To: peter.maydell@linaro.org Date: Wed, 30 Aug 2017 18:52:15 +0200 Message-Id: <20170830165252.13421-8-cohuck@redhat.com> In-Reply-To: <20170830165252.13421-1-cohuck@redhat.com> References: <20170830165252.13421-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 30 Aug 2017 16:53:27 +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 Subject: [Qemu-devel] [PULL 07/44] tests: Run filter-redirector and -mirror test only on POSIX systems 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: thuth@redhat.com, david@redhat.com, Cornelia Huck , agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, rth@twiddle.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This way we can get rid of the ugly #ifdefs in the code which makes it easier to extend later. Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck Message-Id: <1502951113-4246-2-git-send-email-thuth@redhat.com> Reviewed-by: David Hildenbrand Reviewed-by: Zhang Chen Signed-off-by: Cornelia Huck --- tests/Makefile.include | 8 ++++---- tests/test-filter-mirror.c | 5 ----- tests/test-filter-redirector.c | 10 ---------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index ea0f15f70b..871791d2fc 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -283,8 +283,8 @@ ifeq ($(CONFIG_VHOST_USER_NET_TEST_i386),) check-qtest-x86_64-$(CONFIG_VHOST_USER_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF) endif check-qtest-i386-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF) -check-qtest-i386-y += tests/test-filter-mirror$(EXESUF) -check-qtest-i386-y += tests/test-filter-redirector$(EXESUF) +check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF) +check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF) check-qtest-i386-y += tests/postcopy-test$(EXESUF) check-qtest-i386-y += tests/test-x86-cpuid-compat$(EXESUF) check-qtest-i386-y += tests/numa-test$(EXESUF) @@ -325,8 +325,8 @@ check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF) gcov-files-ppc64-y += hw/usb/hcd-xhci.c check-qtest-ppc64-y += $(check-qtest-virtio-y) check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF) -check-qtest-ppc64-y += tests/test-filter-mirror$(EXESUF) -check-qtest-ppc64-y += tests/test-filter-redirector$(EXESUF) +check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF) +check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF) check-qtest-ppc64-y += tests/display-vga-test$(EXESUF) check-qtest-ppc64-y += tests/numa-test$(EXESUF) check-qtest-ppc64-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF) diff --git a/tests/test-filter-mirror.c b/tests/test-filter-mirror.c index 9f84402493..a1d5865ef7 100644 --- a/tests/test-filter-mirror.c +++ b/tests/test-filter-mirror.c @@ -17,9 +17,6 @@ static void test_mirror(void) { -#ifndef _WIN32 -/* socketpair(PF_UNIX) which does not exist on windows */ - int send_sock[2], recv_sock; char *cmdline; uint32_t ret = 0, len = 0; @@ -74,8 +71,6 @@ static void test_mirror(void) g_free(recv_buf); close(recv_sock); unlink(sock_path); - -#endif } int main(int argc, char **argv) diff --git a/tests/test-filter-redirector.c b/tests/test-filter-redirector.c index 0c4b8d52ef..69c663b183 100644 --- a/tests/test-filter-redirector.c +++ b/tests/test-filter-redirector.c @@ -59,9 +59,6 @@ static void test_redirector_tx(void) { -#ifndef _WIN32 -/* socketpair(PF_UNIX) which does not exist on windows */ - int backend_sock[2], recv_sock; char *cmdline; uint32_t ret = 0, len = 0; @@ -129,15 +126,10 @@ static void test_redirector_tx(void) unlink(sock_path0); unlink(sock_path1); qtest_end(); - -#endif } static void test_redirector_rx(void) { -#ifndef _WIN32 -/* socketpair(PF_UNIX) which does not exist on windows */ - int backend_sock[2], send_sock; char *cmdline; uint32_t ret = 0, len = 0; @@ -203,8 +195,6 @@ static void test_redirector_rx(void) unlink(sock_path0); unlink(sock_path1); qtest_end(); - -#endif } int main(int argc, char **argv)