From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 0FC45385803B for ; Thu, 7 Jan 2021 16:12:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0FC45385803B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 9769011C90; Thu, 7 Jan 2021 17:12:06 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nAchb-1XNwsy; Thu, 7 Jan 2021 17:12:05 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p5085535c.dip0.t-ipconnect.de [80.133.83.92]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id C569111B94; Thu, 7 Jan 2021 17:12:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1610035925; bh=5vDZyWGu9A6fgPyisZ+8KOcMrNGQgCa6yz5EOd1DXTc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=bDJgC3syfgYd0v6FZuV+l4MtuVl1wNgiGxlm6DhJ1/ah0vjll/IvyAo6p770X8PMJ NScGmhdsLQNePXIE/7hF8Cn9gpEPYJcK08J9hllkQISkJQ4wHeYHwoF7+g92BEVwMy uKvtTLh9DslmDcVpZRV4sDH7UmSOHrfQOlQ5EXyiF4Y/D2p+lmr3wFGNNqHnnPMeqg nNcn8CPf+flwL95q7XTYDwxBdYvxpAwL4pd3cPjXrJnsvOyjypGqz1X4xuvtE1NyOi iLtj0M3yBgIXAktmhqCDDyrfjGzwaOsL5mc10o9CcByyuRoVZPdHuE3RzmWRJEpPC2 1Ty97yAvwzSGA== From: Rainer Orth To: Bernd Edlinger Cc: "gcc-patches@gcc.gnu.org" , Mike Stump , Alexandre Oliva Subject: Re: [PATCH] Fix test failures from outputs.exp (PR testsuite/98225) References: Date: Thu, 07 Jan 2021 17:12:04 +0100 In-Reply-To: (Bernd Edlinger's message of "Thu, 7 Jan 2021 09:48:29 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3795.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 16:12:09 -0000 Hi Bernd, > this should fix the test failures in this test case. > > Is it OK for trunk? unfortunately not: there are two bugs and a couple of nits: * When testing with runtest --tool gcc outputs.exp I get ERROR: tcl error sourcing /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.misc-tests/outputs.exp. ERROR: can't unset "env(MAKEFLAGS)": no such element in array while executing "unset env($var)" (procedure "unsetenv" line 3) invoked from within "unsetenv MAKEFLAGS" (file "/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.misc-tests/outputs.exp" line 72) invoked from within "source /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.misc-tests/outputs.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.misc-tests/outputs.exp" invoked from within "catch "uplevel #0 source $test_file_name"" The unsetenv needs to be wrapped in if [info exists env(MAKEFLAGS)] { to avoid this. * diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp --- a/gcc/testsuite/gcc.misc-tests/outputs.exp +++ b/gcc/testsuite/gcc.misc-tests/outputs.exp @@ -67,6 +67,10 @@ if {[board_info $dest exists output_form append link_options " additional_flags=-Wl,-oformat,[board_info $dest output_format]" } +# Avoid possible influence from the make jobserver, +# otherwise ltrans0.ltrans_args files may be missing. +unsetenv MAKEFLAGS The comment is misleading: it's not just *.ltrans_args, but also *.ltrans.args.0. Maybe there's a collective term for those files in lto-wrapper instead? @@ -163,6 +167,9 @@ proc outest { test sources opts dirs out if { $ogl != {} } { pass "$test: $d$o" file delete $ogl + } elseif { [string match "*.ld1_args" $o] } { + # This file may be missing if !HAVE_GNU_LD + pass "$test: $d$o" Always PASSing the test even if it isn't run is wrong. Either wrap the whole group of tests with response files in if [check_effective_target_gld] { or make the test for the *.ld1_args file conditional on that (e.g. along the lines of $ltop used elsewhere). I'd welcome input from Alexandre which is preferred. A few nits on the patch submission: * Please review https://gcc.gnu.org/contribute.html for the syntax of subject lines: in the present case this should be something like [PATCH] testsuite: Fix test failures from outputs.exp [PR98225] * Both the mail and the patch description should contain a self-contained description of the bug and the fix so potential reviewers don't have to re-read a (potentially excessively long) bugzilla report. * Your ChangeLog entry isn't particularly helpful: 2021-01-07 Bernd Edlinger PR testsuite/98225 * gcc.misc-tests/outputs.exp: Fix test case. This tells the reader almost nothing. Instead, it should list *what changed* in the patch; for the current patch something like * gcc.misc-tests/outputs.exp: Unset MAKEFLAGS. Always pass *.ld1_args tests. There's more than you ever wanted to know on ChangeLogs in the GNU Coding Standards ;-) Thanks for working on this. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University