From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 6E3A4382890B for ; Wed, 10 May 2023 13:42:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6E3A4382890B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-50bc3a2d333so11020556a12.0 for ; Wed, 10 May 2023 06:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683726133; x=1686318133; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yL/HNEoLQAUUK0zIs2PK/b0hyjHi1Bm0zWGyDL9DzwQ=; b=uU3Emopk3lWwfdF0D8bqhGHGyxA9VzvtUj0JCTF9xbuF09NRD574HJMuXiSGi9S9o4 6UtdmV4QK69+omCP8uzbgzinbTKKigpYYX/uXkcpCpik6w/RYGL6AjRqUMzBIbJ2TWbY VwBgHNPm62ysSM2gaYl5kDHvrlUq97J9n9NsZcnU4e2ENJCvavN+Mpqe9bGnfnSAfUxj 9+QS3yLpdHA1LInmxJbYFcRQOiPrxHfZ4RJBFf2w7kcTwHG7GL/pw+j/RnsVKGJXcc8I ftaGLKbTu0xL/B+k6VE1xOP/Cx+huWrDobZm+mrYBkQcruYTbLA5FXcZTS1ECxST3LYz 8NFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683726133; x=1686318133; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yL/HNEoLQAUUK0zIs2PK/b0hyjHi1Bm0zWGyDL9DzwQ=; b=MUVeo0BsLnE/TcmwpP6A2NqXvUXrOJYSVAKOrJLytkIcFZ1GePzUFE+LfYKzG6u7+y ui5O6rwFtzpJNXsEbjOEJqOsE/adPYRO9SGHNdqs1/eScwPFeUv5UqF7rg17VI7sEvlI K8QMpd2wRw3IH/q17UPjBZmoMtwTqYc+LEk0XEgwY0+PVUpNK6B3CTe7CoJWc0tfnZnV kh5vPGqe4wMSEHP0PC3pekKV6NGVGfe8Kgx8Cyk1Nie5nWOtgt3xKk77npjCSXFo9ofy hr7b304UB90J5scIJyWkGAPGc3iM8X43mfkZPlOOjQEDjpHMDsfhY2AGUMdRgx6mWl/9 U/XQ== X-Gm-Message-State: AC+VfDwojegkP21cmFVIZb5GjtaI5MNKZoz5Vx7V6o614m1CRDYkU2B4 9zhs56/kKImsiZZNv2VOTJnBhzs2AMfhngiWU9KeoA== X-Google-Smtp-Source: ACHHUZ7zMiztOcmK9JvoBWoqSXdK+n0p+sn4mr598cxrUAOqV3zuRONi4HBknx1u4hnCmWlokfyreMxpN/pz/Q6pOHM= X-Received: by 2002:a05:6402:74e:b0:508:3b1f:e6b5 with SMTP id p14-20020a056402074e00b005083b1fe6b5mr14441088edy.15.1683726133006; Wed, 10 May 2023 06:42:13 -0700 (PDT) MIME-Version: 1.0 References: <20110927172322.GA21068@kam.mff.cuni.cz> <875y99d5rt.fsf@euler.schwinge.homeip.net> <87lehxswug.fsf@euler.schwinge.homeip.net> <87fs84sjxl.fsf@euler.schwinge.homeip.net> In-Reply-To: <87fs84sjxl.fsf@euler.schwinge.homeip.net> From: Christophe Lyon Date: Wed, 10 May 2023 15:42:04 +0200 Message-ID: Subject: Re: Testsuite: Add 'torture-init-done', and use it to conditionalize implicit 'torture-init' (was: Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage (was: Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS')) To: Thomas Schwinge Cc: gcc-patches@gcc.gnu.org, Richard Biener , Jan Hubicka , Rainer Orth , Mike Stump Content-Type: multipart/alternative; boundary="0000000000000eb7d805fb570af8" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,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 List-Id: --0000000000000eb7d805fb570af8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Thomas, On Wed, 10 May 2023 at 09:52, Thomas Schwinge wrote: > Hi Christophe! > > On 2023-05-09T21:14:07+0200, Christophe Lyon > wrote: > > On Tue, 9 May 2023 at 17:17, Christophe Lyon > > > wrote: > >> On Tue, 9 May 2023 at 11:00, Thomas Schwinge > >> wrote: > >>> On 2023-05-09T09:32:55+0200, Christophe Lyon < > christophe.lyon@linaro.org> > >>> wrote: > >>> > On Wed, 3 May 2023 at 13:47, Richard Biener via Gcc-patches < > >>> gcc-patches@gcc.gnu.org> wrote: > >>> >> On Wed, 3 May 2023, Thomas Schwinge wrote: > >>> >> > "Let each 'lto_init' determine the default 'LTO_OPTIONS', and > >>> 'torture-init' the 'LTO_TORTURE_OPTIONS'"? > >>> > > >>> > This is causing issues on arm/aarch64, including: > >>> > > >>> > ERROR: can't read "LTO_TORTURE_OPTIONS": no such variable > >>> > in gcc.target/arm/acle/acle.exp: > >>> > > >>> > ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected > >>> > in gcc.target/aarch64/sls-mitigation/sls-mitigation.exp, > >>> > gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp, > >>> > gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp, > >>> > gcc.target/aarch64/torture/aarch64-torture.exp > >>> > > >>> > and maybe others > >>> > > >>> > Are other targets affected too? > >>> > >>> Sorry for that -- it means, the safe-guards I added are working as > >>> expected. > >>> > >>> Please test whether all these issues are gone with the attached > >>> "Testsuite: Add missing 'torture-init'/'torture-finish' around > >>> 'LTO_TORTURE_OPTIONS' usage"? > >> > >> Your patch seemed reasonable, but it doesn't work :-( > >> > >> Well now I get: > >> ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected > >> because gcc-dg-runtest itself calls torture-init > >> > >> but I'm not sure where LTO_TORTURE_OPTIONS is set > > > > Just checking, are you able to test your changes on arm (a cross > toolchain > > is OK) ? > > Sorry, I don't currently have an arm/aarch64 toolchain built. > > > The problem shows up even if running only acle.exp, so it's quick once > you > > have built the toolchain once. > > I did a quick hack: > > --- gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp > +++ gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp > @@ -22,3 +21,0 @@ > -if {![istarget aarch64*-*-*] } then { > - return > -} > --- gcc/testsuite/gcc.target/arm/acle/acle.exp > +++ gcc/testsuite/gcc.target/arm/acle/acle.exp > @@ -20,3 +19,0 @@ > -if ![istarget arm*-*-*] then { > - return > -} > > ..., and confirm to run into the DejaGnu/TCL ERRORs in my > x86_64-pc-linux-gnu testing. > > > I spent some time looking at it, and the conflict is that the .exp file > > calls torture-init and gcc-dg-runtest, which in turn calls torture-init > > again, leading to the error. > > I see, thanks -- and sorry, once again. > > > I haven't checked the details of why there are similar failures on > aarch64. > > I now understand that the problem is the following: most of all '*.exp' > files have 'torture-init' followed by 'set-torture-options' before > 'gcc-dg-runtest' etc., and therefore don't run into the latter's > "Some callers set torture options themselves; don't override those." > code. Some '*.exp' files however do 'torture-init' but not > 'set-torture-options', and therefore we can't any longer conditionalize > the implicit 'torture-init' by '![torture-options-exist]'. > Please in addition to the earlier > "Testsuite: Add missing 'torture-init'/'torture-finish' around > 'LTO_TORTURE_OPTIONS' usage" > also apply the attached > "Testsuite: Add 'torture-init-done', and use it to conditionalize implicit > 'torture-init'". > That hopefully should restore sanity -- if not, I'll get arm/aarch64 > toolchains built. > > Thanks for the patch, it seems to work! Christophe > > Gr=C3=BC=C3=9Fe > Thomas > > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 2= 01, > 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: > Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaft: M=C3=BCnchen; > Registergericht M=C3=BCnchen, HRB 106955 > --0000000000000eb7d805fb570af8--