From patchwork Sat Aug 2 16:26:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 375939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 403C61400B9 for ; Sun, 3 Aug 2014 02:27:04 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=xXt2SJdYHRpeX/bx2 1hXS3VElfnKw2eMjNhTNzOzV95QkkMYhsjuEUA8qjDBU7AnUMqBydMy7CdDQjlnF 18M+V/ldtFWu5SnnbyKEO04GPEQXBKtjKqbLCSiAxiaXki+z5hDOlf1aOyorIhfK SRC7S0ycEOKmfUHo2JklpcSowc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=avN16zdmDQpmd9MdQpP6+sB BEow=; b=rWYS2pR3Czh7U+5jpg2UXXN5K+46dqoIrLy7H1v2M7qta/K9cGjQzA+ SQ/mo8mZAHkmlNs38ymVP1fkxJNuTv8HwMeA89oCC4pvqdAlLPJNrcSIK8JGKfng Fa6QhHRhzNtRSDrwVdGOZnJiesjear14FCX9UkD1+iYK9ikVgSTo= Received: (qmail 6462 invoked by alias); 2 Aug 2014 16:26:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 6451 invoked by uid 89); 2 Aug 2014 16:26:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 02 Aug 2014 16:26:53 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XDc8u-0001JM-Dc from Tom_deVries@mentor.com ; Sat, 02 Aug 2014 09:26:48 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 2 Aug 2014 09:26:48 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Sat, 2 Aug 2014 17:26:45 +0100 Message-ID: <53DD1143.2030001@mentor.com> Date: Sat, 2 Aug 2014 18:26:43 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Rainer Orth CC: GCC Patches , Mike Stump Subject: Re: [PATCH][testsuite] Don't run cproj-fails-with-broken-glibc.c for broken glibc References: <53DA9714.5070707@mentor.com> In-Reply-To: On 01-08-14 12:35, Rainer Orth wrote: > Hi Tom, > >> The test-case cproj-fails-with-broken-glibc.c does not work with broken >> glibcs, as the header comment mentions: >> ... >> Check the runtime behavior of the C library's cproj() function and >> whether it follows the standard. Versions of GLIBC through 2.11.1 >> had an incorrect implementation which will conflict with GCC's >> builtin cproj(). GLIBC 2.12+ should be okay. >> ... >> >> This patch skips the test for known broken glibcs. OK for trunk? > > I'm not at all happy with this patch: unless absolutely necessary, we > shouldn't check for version numbers when there's any way to check for > working/broken features instead. > > I'm all for keeping testsuite results clean, but this seems like a total > corner case to me. Which distributions do still use affected glibc > versions? > Ubuntu 10.04 LTS > That test, even if we go the glibc version route, needs to be XFAILed > instead of requiring the working version. Apart from that, new > effective-target keywords need documenting in doc/sourcebuild.texi. > I've made it an xfail, and added documentation in attached follow-up patch. OK? Or do we go with the removal suggestion of Mike? Thanks, - Tom 2014-08-01 Tom de Vries * gcc.dg/cproj-fails-with-broken-glibc.c: Use xfail for broken glibc version instead of required-target. * lib/target-supports.exp (check_effective_target_not_glibc_2_11_or_earlier): Replace by ... (check_effective_target_glibc_2_11_or_earlier): ... this. * doc/sourcebuild.texi (glibc, glibc_2_12_or_later) (glibc_2_11_or_earlier): Document effective-target keywords. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 39152df..0793f80 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1804,6 +1804,15 @@ Target is a VxWorks RTP. @item wchar Target supports wide characters. + +@item glibc +Target supports glibc + +@item glibc_2_12_or_later +Target supports glibc 2.12 or later + +@item glibc_2_11_or_earlier +Target supports glibc 2.11 or earlier @end table @subsubsection Other attributes diff --git a/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c b/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c index 1df29f9..fc37fac 100644 --- a/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c +++ b/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c @@ -7,11 +7,10 @@ Origin: Kaveh R. Ghazi, April 20, 2010. */ -/* { dg-do run } */ +/* { dg-do run { xfail glibc_2_11_or_earlier } } */ /* { dg-options "-fno-builtin-cproj" } */ /* { dg-add-options c99_runtime } */ /* { dg-require-effective-target c99_runtime } */ -/* { dg-require-effective-target not_glibc_2_11_or_earlier } */ extern void abort(void); extern void exit(int); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index cbe2930..7157d2a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5061,19 +5061,19 @@ proc check_effective_target_glibc_2_12_or_later {} { }] } -# Return true if this is a not a glibc 2.11 or earlier target. +# Return true if this is a glibc 2.11 or earlier target. -proc check_effective_target_not_glibc_2_11_or_earlier {} { +proc check_effective_target_glibc_2_11_or_earlier {} { if { ![check_effective_target_glibc] } { return 1 } if { [check_effective_target_glibc_2_12_or_later] } { - return 1 + return 0 } - return 0 + return 1 } # Return true if this is NOT a Bionic target. -- 1.9.1