From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7479 invoked by alias); 23 Jun 2015 16:41:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7466 invoked by uid 89); 23 Jun 2015 16:41:09 -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,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jun 2015 16:41:07 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-18-1s3BakfnSL2QXR0OgT3b0A-1 Received: from e106375-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Jun 2015 17:41:04 +0100 From: James Greenhalgh To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, mikestump.comcast.net Subject: Re: [PATCH][testsuite] Fix TORTURE_OPTIONS overriding Date: Tue, 23 Jun 2015 17:26:00 -0000 Message-Id: <1435077660-14023-1-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <93598EAE-787F-42AC-BF98-EFC1A868DB46@comcast.net> References: <93598EAE-787F-42AC-BF98-EFC1A868DB46@comcast.net> MIME-Version: 1.0 X-MC-Unique: 1s3BakfnSL2QXR0OgT3b0A-1 Content-Type: multipart/mixed; boundary="------------2.2.0" X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg01595.txt.bz2 This is a multi-part message in MIME format. --------------2.2.0 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable Content-length: 1782 On Thu, Jun 18, 2015 at 11:10:01AM +0100, Richard Biener wrote: > > Currently when doing > > make check-gcc RUNTESTFLAGS=3D"TORTURE_OPTIONS=3D\\\"{ -O3 } { -O2 }\\\" > dg-torture.exp" > > you get -O3 and -O2 but also the two LTO torture option combinations. > That's undesired (those are the most expensive anyway). The following > patch avoids this by setting LTO_TORTURE_OPTIONS only when > TORTURE_OPTIONS isn't specified. > > Tested with and without TORTURE_OPTIONS for C and fortran tortures. > > Seems the instruction in c-torture.exp how to override TORTURE_OPTIONS > is off, RUNTESTFLAGS=3D"TORTURE_OPTIONS=3D\\\"{ { -O3 } { -O2 } }\\\" > certainly doesn't do what it should. This patch causes issues for ARM and AArch64 cross multilib testing. There are two issues, one is that we now clobber gcc_force_conventional_output after setting it in the conditional this patch moved (hits all targets, see the new x86-64 failures like pr61848.c). The other is that we no longer protect environment settings before calling check_effective_target_lto, which results in our cross --specs files no longer being on the path. I've fixed these issues by rearranging the file again, but I'm not sure if what I've done is sensible and does not cause other issues. This seems to bring back the tests I'd lost overnight, and doesn't cause issues elsewhere. I've run some cross-tests to ensure this brings back the missing tests, and a full x86-64 testrun to make sure I haven't dropped any from there. OK for trunk? Thanks, James --- 2015-06-23 James Greenhalgh * lib/c-torture.exp: Don't call check_effective_target_lto before setting up environment correctly. * lib/gcc-dg.exp: Likewise, and protect gcc_force_conventional_output. --------------2.2.0 Content-Type: text/x-patch; name=0001-Re-PATCH-testsuite-Fix-TORTURE_OPTIONS-overriding.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Re-PATCH-testsuite-Fix-TORTURE_OPTIONS-overriding.patch" Content-length: 3017 diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.= exp index 607e7d0..c88c439 100644 --- a/gcc/testsuite/lib/c-torture.exp +++ b/gcc/testsuite/lib/c-torture.exp @@ -21,6 +21,20 @@ load_lib file-format.exp load_lib target-libpath.exp load_lib target-utils.exp =20 +global GCC_UNDER_TEST +if ![info exists GCC_UNDER_TEST] { + set GCC_UNDER_TEST "[find_gcc]" +} + +global orig_environment_saved + +# This file may be sourced, so don't override environment settings +# that have been previously setup. +if { $orig_environment_saved =3D=3D 0 } { + append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] + set_ld_library_path_env_vars +} + # The default option list can be overridden by # TORTURE_OPTIONS=3D"{ list1 } ... { listN }" =20 @@ -68,20 +82,6 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] { [concat $C_TORTURE_OPTIONS $ADDITIONAL_TORTURE_OPTIONS] } =20 -global GCC_UNDER_TEST -if ![info exists GCC_UNDER_TEST] { - set GCC_UNDER_TEST "[find_gcc]" -} - -global orig_environment_saved - -# This file may be sourced, so don't override environment settings -# that have been previously setup. -if { $orig_environment_saved =3D=3D 0 } { - append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] - set_ld_library_path_env_vars -} - # # c-torture-compile -- runs the Tege C-torture test # diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 00ca0c5..d463f81 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -46,6 +46,19 @@ if ![info exists GCC_UNDER_TEST] { set GCC_UNDER_TEST "[find_gcc]" } =20 +# This file may be sourced, so don't override environment settings +# that have been previously setup. +if { $orig_environment_saved =3D=3D 0 } { + append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] + set_ld_library_path_env_vars +} + +# Some torture-options cause intermediate code output, unusable for +# testing using e.g. scan-assembler. In this variable are the options +# how to force it, when needed. +global gcc_force_conventional_output +set gcc_force_conventional_output "" + set LTO_TORTURE_OPTIONS "" if [info exists TORTURE_OPTIONS] { set DG_TORTURE_OPTIONS $TORTURE_OPTIONS @@ -92,19 +105,6 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] { =20 global orig_environment_saved =20 -# This file may be sourced, so don't override environment settings -# that have been previously setup. -if { $orig_environment_saved =3D=3D 0 } { - append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] - set_ld_library_path_env_vars -} - -# Some torture-options cause intermediate code output, unusable for -# testing using e.g. scan-assembler. In this variable are the options -# how to force it, when needed. -global gcc_force_conventional_output -set gcc_force_conventional_output "" - # Deduce generated files from tool flags, return finalcode string proc schedule-cleanups { opts } { global additional_sources --------------2.2.0--