From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id BDB0B389367A for ; Thu, 11 Jun 2020 14:59:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BDB0B389367A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 534C31E111; Thu, 11 Jun 2020 10:59:10 -0400 (EDT) Subject: Re: [committed][gdb/testsuite] Make gdb.base/dbx.exp more robust To: Tom de Vries , Pedro Alves , Andrew Burgess Cc: gdb-patches@sourceware.org References: <20200519163004.GA9045@delia> <20200602153830.GZ3522@embecosm.com> <72b3c10c-d316-9a0e-13e9-56dee7c765a7@redhat.com> <5d6277ac-76ea-5f47-ab9e-7da58fbddd6e@suse.de> <9352af37-7ed7-661c-11f1-59fbc6a886e9@suse.de> <33977d5b-3735-eaef-36fa-584f9111b5de@simark.ca> From: Simon Marchi Message-ID: <9b5f1ab7-7116-4bd0-b61c-e6e99a1a2ed1@simark.ca> Date: Thu, 11 Jun 2020 10:59:09 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, 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: 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: , X-List-Received-Date: Thu, 11 Jun 2020 14:59:11 -0000 On 2020-06-11 10:52 a.m., Tom de Vries wrote: > On 11-06-2020 16:39, Simon Marchi wrote: >> On 2020-06-11 8:11 a.m., Tom de Vries wrote: >>> [ was: Re: [PATCH 3/3][gdb/testsuite] Warn about leaked global array ] >>> >>> On 04-06-2020 13:40, Tom de Vries wrote: >>>>> BTW, global variables alone aren't the full scope of the >>>>> bleeding between testcases. There's also the case of >>>>> testcases overriding procedures, like gdb.base/dbx.exp, >>>>> but those are perhaps rare enough that we can continue >>>>> handling it "manually" as before. >>>> AFAICT, that test-case does an effort to undo the override, though I'm >>>> not sure how certain it is that the undo will be executed. >>> >>> I've committed patch below to make sure the undo is executed (and >>> similar for GDBFLAGS). >>> >>> Thanks, >>> - Tom >>> >> >> Ah! That reminded me that I had a patch I had forgotten about that did something >> similar: >> >> https://sourceware.org/pipermail/gdb-patches/2020-May/169109.html >> > > Sorry, didn't notice that one. No problem, I had forgotten about it and it would probably have fallen through the cracks actually... we (at least I) really need a way to track patches. > So, I'm not sure why you say that it's not necessary. Ahh sorry, it's early. I misread the code as: + # Return as appropriate. + if { $code == 1 } { + global errorInfo errorCode + return -code error -errorinfo $errorInfo -errorcode $errorCode $result + } else { + return -code $code $result + } + + return $result All is good then :). Simon