From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id y9qCFbNg8186IwAAWB0awg (envelope-from ) for ; Mon, 04 Jan 2021 13:38:43 -0500 Received: by simark.ca (Postfix, from userid 112) id 4C0D11F0AA; Mon, 4 Jan 2021 13:38:43 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7039F1E590 for ; Mon, 4 Jan 2021 13:38:41 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1B6D038930D0; Mon, 4 Jan 2021 18:38:41 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 5B55D388A437 for ; Mon, 4 Jan 2021 18:38:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5B55D388A437 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 57F39AF9C; Mon, 4 Jan 2021 18:38:37 +0000 (UTC) Subject: Re: [PATCH][gdb/testsuite] Don't require gold for gdb.base/morestack.exp To: Andrew Burgess References: <20210104125453.GA4963@delia> <20210104150353.GZ2945@embecosm.com> From: Tom de Vries Message-ID: Date: Mon, 4 Jan 2021 19:38:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210104150353.GZ2945@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 1/4/21 4:03 PM, Andrew Burgess wrote: > * Tom de Vries [2021-01-04 13:54:55 +0100]: > >> Hi, >> >> While working on PR26935 I noticed that the test-case requires the gold >> linker, but doesn't really need it. >> >> The -fuse-ld=gold was added to support the printf in the test-case, which >> prints some information but is not otherwise needed for the test-case. >> >> Fix this by commenting out the printf and removing the corresponding >> -fuse-ld=gold. >> >> Tested on x86_64. >> >> Also checked that the test still fails when the fix from the commit that added >> the test-case is reverted. >> >> Any comments? >> >> Thanks, >> - Tom >> >> [gdb/testsuite] Don't require gold for gdb.base/morestack.exp >> >> gdb/testsuite/ChangeLog: >> >> 2021-01-04 Tom de Vries >> >> * gdb.base/morestack.c: Comment out printf. >> * gdb.base/morestack.exp: Don't use -fuse-ld=gold. >> >> --- >> gdb/testsuite/gdb.base/morestack.c | 4 ++++ >> gdb/testsuite/gdb.base/morestack.exp | 8 +------- >> 2 files changed, 5 insertions(+), 7 deletions(-) >> >> diff --git a/gdb/testsuite/gdb.base/morestack.c b/gdb/testsuite/gdb.base/morestack.c >> index 6f9a27ed2c8..792a38a0cfe 100644 >> --- a/gdb/testsuite/gdb.base/morestack.c >> +++ b/gdb/testsuite/gdb.base/morestack.c >> @@ -63,7 +63,11 @@ down (int i) >> >> if (last && last < (void *) buf) >> { >> +#if 0 >> + /* Debug statement, requires gold linker. See GCC documentation of >> + -fsplit-stack. */ >> printf ("%d: %p < %p\n", i, last, buf); >> +#endif > > I'm not a fan of '#if 0' guards. There are a few cases when it can > add value - the code within is effectively an extended comment, but > with "real" code highlighting/indentation. > > This doesn't feel like one of these cases, so I'd vote to just remove > the code completely. It's in the history if anyone ever cares to look > for it. > Hi Andrew, thanks for the review. Committed with the printf removed. Thanks, - Tom > Thanks, > Andrew > > > >> marker_hit (); >> } >> last = buf; >> diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp >> index 627ae8164c3..99807a291ee 100644 >> --- a/gdb/testsuite/gdb.base/morestack.exp >> +++ b/gdb/testsuite/gdb.base/morestack.exp >> @@ -21,17 +21,11 @@ if {$gcc_compiled == 0} { >> return -1 >> } >> >> -if { [have_fuse_ld_gold] == 0} { >> - return -1 >> -} >> - >> standard_testfile >> >> -# -fuse-ld=gold is used for calling printf code built without -fsplit-stack >> -# which could crash otherwise. See GCC documentation of -fsplit-stack. >> set opts "additional_flags=-fsplit-stack" >> if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile \ >> - [list $opts additional_flags=-fuse-ld=gold]] } { >> + [list $opts]] } { >> return -1 >> } >>