From patchwork Fri May 24 13:29:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 10959873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04630112C for ; Fri, 24 May 2019 13:32:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D953528613 for ; Fri, 24 May 2019 13:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C78542883A; Fri, 24 May 2019 13:32:04 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 394D128613 for ; Fri, 24 May 2019 13:32:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hUAGk-0007dk-Nf; Fri, 24 May 2019 13:29:58 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hUAGj-0007df-Iw for xen-devel@lists.xenproject.org; Fri, 24 May 2019 13:29:57 +0000 X-Inumbo-ID: 047f636a-7e28-11e9-8980-bc764e045a96 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 047f636a-7e28-11e9-8980-bc764e045a96; Fri, 24 May 2019 13:29:55 +0000 (UTC) Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL01.citrite.net Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:23.29.105.83 ip4:162.221.156.83 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL01.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@MIAPEX02MSOL01.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: abTgHiboO0LijqjzNUN0k/kcdz2estFlDdMSc9u8YRKFPN1DVB3BUo6fXFzamLSOLDnQIWv6OP JKZyC94WiStEIJd9+5ljt0/nASBr4KbVhc73rww6gLmM0rt301QGzeJCuxo7W53h+D7x094cv+ JbhjZe3qh/D/06ECtL7PabBjIoiWCP1PL+j1a8hcGGyCsFO0vc3h7m/JJe+bHUkMlAR2nkQfi1 SB5/Qd7c4fwrWlrI9wOcvSxZob22N2QvTVU/ntjP4IcNG6iKCUo0xnLhT3eQeLvqfOrGyCiNir HB8= X-SBRS: 2.7 X-MesageID: 881362 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,507,1549947600"; d="scan'208";a="881362" From: Andrew Cooper To: Xen-devel Date: Fri, 24 May 2019 14:29:46 +0100 Message-ID: <1558704586-829-1-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] tests/cpu-policy: Skip building on older versions of GCC X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Ian Jackson , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP GCC 4.4 (as included in CentOS 6) is too old to handle designated initialisers in anonymous unions. As this is just a developer tool, skip the test in this case, rather than sacraficing the legibility/expresibility of the test cases. This fixes the Gitlab CI tests. While adding this logic to cpu-polcy, adjust the equivelent logic from x86_emulator on which this was based. Printing: Test harness not built, use newer compiler than "gcc" isn't helpful for anyone unexpectedly encountering the error. Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Ian Jackson --- tools/tests/cpu-policy/Makefile | 14 +++++++++++++- tools/tests/x86_emulator/Makefile | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/tests/cpu-policy/Makefile b/tools/tests/cpu-policy/Makefile index eeed7f3..4b6caec 100644 --- a/tools/tests/cpu-policy/Makefile +++ b/tools/tests/cpu-policy/Makefile @@ -1,8 +1,20 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk +TARGET-y := test-cpu-policy + +# For brevity, these tests make extensive use of designated initialisers, but +# GCCs older than 4.6 can't cope. Ignore the test in this case. +ifneq ($(clang),y) +TARGET-$(call cc-ver,$(CC),lt,0x040600) := +endif + +ifeq ($(TARGET-y),) +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion)) +endif + .PHONY: all -all: test-cpu-policy +all: $(TARGET-y) .PHONY: clean clean: diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile index 4f4c0f6..970ec3e 100644 --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@ -97,7 +97,7 @@ $(foreach flavor,$(SIMD) $(FMA),$(eval $(call simd-check-cc,$(flavor)))) TARGET-$(shell echo 'asm("{evex} vzeroall");' | $(CC) -x c -c -o /dev/null - || echo y) := ifeq ($(TARGET-y),) -$(warning Test harness not built, use newer compiler than "$(CC)") +$(warning Test harness not built, use newer compiler than $(CC) $(shell $(CC) -dumpversion) and an "{evex}" capable assembler) endif all: $(TARGET-y)