From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5846 invoked by alias); 17 Feb 2020 23:58:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5835 invoked by uid 89); 17 Feb 2020 23:58:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Feb 2020 23:58:40 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 01HNwWeD017119 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Feb 2020 18:58:37 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 01HNwWeD017119 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1581983919; bh=wOkDaRGuSXUHQ0hmPGFSNkRd/yy4GpF3SX2g4gQG2jA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=SwaeeA9fxCC8njn5mdsRI0Zm/cRyJiCPID3D7QDwKeu65As/2Z0bKO+DnfWdkFOzx LFUZjxIiGhV1ALq5vtur1Pyzl7qONuMT5GnJ4Lu+DX7y9q1TsiN/a1imZ7r+fysvzW 1+Qh9E0zm7Qvv7e9saqgvysxCCtKgigH9aPu0Rlw= Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (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 771541E092; Mon, 17 Feb 2020 18:58:32 -0500 (EST) Subject: Re: [PATCH][gdb/testsuite] Ignore pass/fail/unsupported in gdb-caching-proc.exp To: Tom de Vries , Tom Tromey Cc: gdb-patches@sourceware.org References: <20200213105754.GA22520@delia> <87imkapngd.fsf@tromey.com> <2319b744-2902-9c09-2448-450e40347c04@suse.de> From: Simon Marchi Message-ID: Date: Mon, 17 Feb 2020 23:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00696.txt.bz2 On 2020-02-17 6:23 p.m., Tom de Vries wrote: > diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp > index 9933cc951e..0689eeb239 100644 > --- a/gdb/testsuite/lib/ada.exp > +++ b/gdb/testsuite/lib/ada.exp > @@ -52,9 +52,9 @@ proc target_compile_ada_from_dir {builddir source dest type options} { > return -options $options $result > } > > -# Compile some Ada code. > +# Compile some Ada code. Return "" if the compile was successful. > > -proc gdb_compile_ada {source dest type options} { > +proc gdb_compile_ada_1 {source dest type options} { > > set srcdir [file dirname $source] > set gprdir [file dirname $srcdir] > @@ -80,6 +80,15 @@ proc gdb_compile_ada {source dest type options} { > # We therefore simply check whether the dest file has been created > # or not. Unless not present, the build has succeeded. > if [file exists $dest] { set result "" } > + return $result > +} > + > +# Compile some Ada code. Generate "PASS: foo.exp: compilation SOURCE" if the > +# compile was successful. > + > +proc gdb_compile_ada {source dest type options} { > + set result [gdb_compile_ada_1 $source $dest $type $options] > + > gdb_compile_test $source $result > return $result > } > @@ -162,15 +171,13 @@ gdb_caching_proc gnat_runtime_has_debug_info { > set src "$srcdir/lib/gnat_debug_info_test.adb" > set dst [standard_output_file "gnat_debug_info_test"] > > - if { [gdb_compile_ada $src $dst executable {debug}] != "" } { > - fail "failed to compile gnat-debug-info test binary" > + if { [gdb_compile_ada_1 $src $dst executable {debug}] != "" } { > return 0 > } > > clean_restart $dst > > if { ! [runto "GNAT_Debug_Info_Test"] } { > - fail "failed to run to GNAT_Debug_Info_Test" > return 0 > } > > @@ -183,7 +190,6 @@ gdb_caching_proc gnat_runtime_has_debug_info { > } > default { > # Some other unexpected output... > - fail $gdb_test_name > } > } > I'd be tempted to keep these last two "fail"s. They should not show up normally, regardless of whether gnatmake is installed. But let's say: - the Ada runtime ever changes (__gnat_debug_raise_exception is renamed), or - the output of the command "whatis __gnat_debug_raise_exception" changes then they'll show up, which is desirable because it means we need to come and change something here. If the output of "whatis __gnat_debug_raise_exception" changes in a way that it is not recognized anymore and there is no FAIL, then gnat_runtime_has_debug_info will just start returning false all the time and we might not notice it for a while. Simon