Message ID | or8rdeqpgh.fsf@lxoliva.fsfla.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2605786vqo; Tue, 23 May 2023 22:17:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7L8Z2OIsliXL82wD1MCgxPOzbPYFw2vVUyrU7gmqRMzQTnufBOnZAkk/cBvgBDRdHWmVSK X-Received: by 2002:a17:907:808:b0:952:b51d:5086 with SMTP id wv8-20020a170907080800b00952b51d5086mr15561121ejb.57.1684905436696; Tue, 23 May 2023 22:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684905436; cv=none; d=google.com; s=arc-20160816; b=yVMg4/BM+7mdYwv1nH5fL8DYU9z3/drIG/HMSnqCHDCsTVxCffscdanlk2TkdzKuky ZlQ+eej/FF1lKpwwdF3k7ou8Jmfpy59KQccx6OD4SOZoNAQ1CreiM5uHFfaauoPsNavD fdi7B6UKVA3go0Qp7h/SU594u4hroCpOUa2MRbM7aQGoKdFVOweA1v/BuC270DHfwXIB A28rXCEqKaWlBw5cDjaJpmNsOEpT97tg8cJzdnIWuoh1c8EnI28H3hAZmCgiQSd/eZqx Z0NPX5fu7vDSbOa0Qgu/SHwV+x45699n8aj+U1/KHxSWrS6XGmlW8+gCyd7bGONESL7x MtxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :user-agent:message-id:date:organization:subject:cc:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=jC5xkxWUqqK3S7p7GhRmFZ3EJB0p1ojiVAnTjlNvlX4=; b=feB3680bdlmn7mSwHf5Ywj3MgRQHOFcH8pxAZ6lNyq1QuOoZ9ysiNAxbgHJ6a19YML 1bN2gwZywkSy4OwQkiID8FFoutQuokUMwHA9MLdubCz2nPg4I8L3qg7+qlaLAd0PH8eY kLseyAVJQES/rlLm/I8YYEJLJz+kXfVFAwW6mTZ6uodspG17CEdKadATmOVjw2I2OYFc SjCz4hjzc749pRYTFrdNsgoBZ2tEPeB5m7QVcWzC3rHxNCh5HRBifOYwwMJ7mrbmWGKw XAwtK91wWF962tbunPOimQq6q0MGeaTdgjtwECfEuRoklcuyNwojdpL+hu4ASk1Dfm2v jOTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IzGvDQLn; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k15-20020a17090627cf00b0096f8ec3d764si541980ejc.914.2023.05.23.22.17.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 22:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IzGvDQLn; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E4573858418 for <ouuuleilei@gmail.com>; Wed, 24 May 2023 05:17:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E4573858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684905435; bh=jC5xkxWUqqK3S7p7GhRmFZ3EJB0p1ojiVAnTjlNvlX4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=IzGvDQLn2LZ9p/r10f65g9GaKsZnEU7xH5eN1a6CWZ7uHgFuwm2H7u0MpaMzyiikr OOENgOG7WlMJ4X/5FqM3DW6PWwXtYzdPjSSitOPo1ph8k5l2/2P/aguHQ32f8aSRHO fvpfbaeGeJibeTia1uPqhnGDOeUiBfKYatAbDwSU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 9DD563858D37 for <gcc-patches@gcc.gnu.org>; Wed, 24 May 2023 05:16:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9DD563858D37 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6a984993740so156650a34.2 for <gcc-patches@gcc.gnu.org>; Tue, 23 May 2023 22:16:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684905389; x=1687497389; h=mime-version:user-agent:message-id:date:errors-to:organization :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jC5xkxWUqqK3S7p7GhRmFZ3EJB0p1ojiVAnTjlNvlX4=; b=WmzttsJVc93yzmUVjI6JC4uDOBULbf61rvstNs1eRx7wJFbzygNhktIB7Cj/zlNW0/ dYUwQf+2F7HQ6OEP9KBiALB3TbWvNFs44NtlZMe9CjIGjEky0cBtenOOTGg01XanXAOz mGLsIzQC3+UVi0nSKj10hDCHJxQGqCu9w3xVVoqBuIXA7Q/RgyKAR52m83iU2ZzxsL1i w3ubi4M+stR7GItSljHGujA0hig5uXHPb58BI18jFjdEvmzGPzmeQdhXu0w0Kg4XL1zj zWmNK1QPsjRH31OAMJS0eufQzpjZyMc4NTT2iqYWGdplDJggaQX83WlX3NSK9H5Z+k+2 dQtw== X-Gm-Message-State: AC+VfDzurY9pfuO9UI38OTEF3PDAE/AIG4ktQRlGNopOlJbjoBaKTunl 8XSQfYePFiJziMIGkFBCsb3J1QbdmPf+foZ4UyI= X-Received: by 2002:a54:448a:0:b0:398:268a:1d00 with SMTP id v10-20020a54448a000000b00398268a1d00mr3219508oiv.51.1684905388926; Tue, 23 May 2023 22:16:28 -0700 (PDT) Received: from free.home ([2804:7f1:2080:6383:46d9:ede8:ee97:8cc0]) by smtp.gmail.com with ESMTPSA id fc12-20020a0568082a8c00b003923e412668sm4477850oib.50.2023.05.23.22.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 22:16:28 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 34O5GF9r3579818 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 24 May 2023 02:16:15 -0300 To: gcc-patches@gcc.gnu.org Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>, Mike Stump <mikestump@comcast.net> Subject: [PATCH] [testsuite] tsvc: skip include malloc.h when unavailable Organization: Free thinker, does not speak for AdaCore Date: Wed, 24 May 2023 02:16:14 -0300 Message-ID: <or8rdeqpgh.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alexandre Oliva <oliva@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766751403649775233?= X-GMAIL-MSGID: =?utf-8?q?1766751403649775233?= |
Series |
[testsuite] tsvc: skip include malloc.h when unavailable
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Alexandre Oliva
May 24, 2023, 5:16 a.m. UTC
tsvc tests all fail on systems that don't offer a malloc.h, other than those that explicitly rule that out. Use the preprocessor to test for malloc.h's availability. tsvc.h also expects a definition for struct timeval, but it doesn't include sys/time.h. Add a conditional include thereof. Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2 with gcc-12. for gcc/testsuite/ChangeLog * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include malloc.h and sys/time.h. --- gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Comments
On Wed, May 24, 2023 at 7:17 AM Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > tsvc tests all fail on systems that don't offer a malloc.h, other than > those that explicitly rule that out. Use the preprocessor to test for > malloc.h's availability. > > tsvc.h also expects a definition for struct timeval, but it doesn't > include sys/time.h. Add a conditional include thereof. > > Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2 > with gcc-12. OK. > > for gcc/testsuite/ChangeLog > > * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include > malloc.h and sys/time.h. > > --- > gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h > index 75494c24cfa62..cd39c041903dd 100644 > --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h > +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h > @@ -11,9 +11,12 @@ > > #include <stdio.h> > #include <stdlib.h> > -#if !defined(__APPLE__) && !defined(__DragonFly__) > +#if __has_include(<malloc.h>) > #include <malloc.h> > #endif > +#if __has_include(<sys/time.h>) > +#include <sys/time.h> > +#endif > #include <string.h> > #include <math.h> > > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Disinformation flourishes because many people care deeply about injustice > but very few check the facts. Ask me about <https://stallmansupport.org>
Hi, Is it okay to backport 2f20d6296087cae51f55eeecb3efefe786191fd6 to releases/gcc-13? Without this backport, I see about 150 failures on arm-none-eabi, an example of them is: FAIL: gcc.dg/vect/tsvc/vect-tsvc-s000.c (test for excess errors) Kind regards, Torbjörn On 2023-05-24 11:02, Richard Biener via Gcc-patches wrote: > On Wed, May 24, 2023 at 7:17 AM Alexandre Oliva via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> >> tsvc tests all fail on systems that don't offer a malloc.h, other than >> those that explicitly rule that out. Use the preprocessor to test for >> malloc.h's availability. >> >> tsvc.h also expects a definition for struct timeval, but it doesn't >> include sys/time.h. Add a conditional include thereof. >> >> Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2 >> with gcc-12. > > OK. > >> >> for gcc/testsuite/ChangeLog >> >> * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include >> malloc.h and sys/time.h. >> >> --- >> gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h >> index 75494c24cfa62..cd39c041903dd 100644 >> --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h >> +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h >> @@ -11,9 +11,12 @@ >> >> #include <stdio.h> >> #include <stdlib.h> >> -#if !defined(__APPLE__) && !defined(__DragonFly__) >> +#if __has_include(<malloc.h>) >> #include <malloc.h> >> #endif >> +#if __has_include(<sys/time.h>) >> +#include <sys/time.h> >> +#endif >> #include <string.h> >> #include <math.h> >> >> >> -- >> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ >> Free Software Activist GNU Toolchain Engineer >> Disinformation flourishes because many people care deeply about injustice >> but very few check the facts. Ask me about <https://stallmansupport.org>
On Fri, Feb 9, 2024 at 11:33 AM Torbjorn SVENSSON <torbjorn.svensson@foss.st.com> wrote: > > Hi, > > Is it okay to backport 2f20d6296087cae51f55eeecb3efefe786191fd6 to > releases/gcc-13? Yes. > Without this backport, I see about 150 failures on arm-none-eabi, an > example of them is: > > FAIL: gcc.dg/vect/tsvc/vect-tsvc-s000.c (test for excess errors) > > > Kind regards, > Torbjörn > > On 2023-05-24 11:02, Richard Biener via Gcc-patches wrote: > > On Wed, May 24, 2023 at 7:17 AM Alexandre Oliva via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > >> > >> > >> tsvc tests all fail on systems that don't offer a malloc.h, other than > >> those that explicitly rule that out. Use the preprocessor to test for > >> malloc.h's availability. > >> > >> tsvc.h also expects a definition for struct timeval, but it doesn't > >> include sys/time.h. Add a conditional include thereof. > >> > >> Bootstrapped on x86_64-linux-gnu. Also tested on ppc- and x86-vx7r2 > >> with gcc-12. > > > > OK. > > > >> > >> for gcc/testsuite/ChangeLog > >> > >> * gcc.dg/vect/tsvc/tsvc.h: Test for and conditionally include > >> malloc.h and sys/time.h. > >> > >> --- > >> gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 5 ++++- > >> 1 file changed, 4 insertions(+), 1 deletion(-) > >> > >> diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h > >> index 75494c24cfa62..cd39c041903dd 100644 > >> --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h > >> +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h > >> @@ -11,9 +11,12 @@ > >> > >> #include <stdio.h> > >> #include <stdlib.h> > >> -#if !defined(__APPLE__) && !defined(__DragonFly__) > >> +#if __has_include(<malloc.h>) > >> #include <malloc.h> > >> #endif > >> +#if __has_include(<sys/time.h>) > >> +#include <sys/time.h> > >> +#endif > >> #include <string.h> > >> #include <math.h> > >> > >> > >> -- > >> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > >> Free Software Activist GNU Toolchain Engineer > >> Disinformation flourishes because many people care deeply about injustice > >> but very few check the facts. Ask me about <https://stallmansupport.org>
On 2024-02-09 11:34, Richard Biener wrote: > On Fri, Feb 9, 2024 at 11:33 AM Torbjorn SVENSSON > <torbjorn.svensson@foss.st.com> wrote: >> >> Hi, >> >> Is it okay to backport 2f20d6296087cae51f55eeecb3efefe786191fd6 to >> releases/gcc-13? > > Yes. Pushed as 5b3dcff46780192a2e526bc434d61c8626898050.
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h index 75494c24cfa62..cd39c041903dd 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h @@ -11,9 +11,12 @@ #include <stdio.h> #include <stdlib.h> -#if !defined(__APPLE__) && !defined(__DragonFly__) +#if __has_include(<malloc.h>) #include <malloc.h> #endif +#if __has_include(<sys/time.h>) +#include <sys/time.h> +#endif #include <string.h> #include <math.h>