From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ARriCx/Hu2GsbQAAWB0awg (envelope-from ) for ; Thu, 16 Dec 2021 18:09:19 -0500 Received: by simark.ca (Postfix, from userid 112) id 189A01F0BD; Thu, 16 Dec 2021 18:09:19 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [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 59F771ECEB for ; Thu, 16 Dec 2021 18:09:18 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C23163858433 for ; Thu, 16 Dec 2021 23:09:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C23163858433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1639696157; bh=dOAxqnJxFQNrgR3rBHv0Jn4ysNC7rTZTfmk9m48vwOk=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZQ9XVZrNVI911mgI3g3Ctrq1LGN+epR0ygq+t7VpP6+Mw28VDfkY3XyeboSAcCgfD i7/NwQVm6akWaBAX3M0/rtSr1ynJXJLf8zViDsZT2h8m+IUh8jZ9VhQDyN1QQhb0Ye YaGaAyn9DFpbWU+cpHd/zeZeERytXbU0PW6Vm39o= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 46E643858D28 for ; Thu, 16 Dec 2021 23:08:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 46E643858D28 Received: from Plymouth (unknown [IPv6:2a02:390:9086:0:7c27:fcf5:8e6d:c1bd]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 4031D80D5D; Thu, 16 Dec 2021 23:08:58 +0000 (UTC) Date: Thu, 16 Dec 2021 23:08:55 +0000 To: Pedro Alves Subject: Re: [PATCH 22/29] gdb/testsuite: Remove duplicates from gdb.base/funcargs.exp Message-ID: <20211216230831.gzisliwejevx3tzi@Plymouth> References: <20211121175636.779325-1-lsix@lancelotsix.com> <20211121175636.779325-23-lsix@lancelotsix.com> <8cddbea1-6388-f2c0-f751-9af6b40f8273@palves.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8cddbea1-6388-f2c0-f751-9af6b40f8273@palves.net> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Thu, 16 Dec 2021 23:08:58 +0000 (UTC) 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: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Fri, Dec 10, 2021 at 11:26:23PM +0000, Pedro Alves wrote: > On 2021-11-21 17:56, Lancelot SIX via Gdb-patches wrote: > > --- a/gdb/testsuite/gdb.base/funcargs.exp > > +++ b/gdb/testsuite/gdb.base/funcargs.exp > > @@ -213,7 +213,7 @@ proc complex_args {} { > > > > # Run; should stop at call1a and print actual arguments. > > gdb_run_cmd > > - gdb_test "" " callca \\(f1=1 \\+ 2i, f2=1 \\+ 2i, f3=1 \\+ 2i\\) .*" "run to call2a" > > + gdb_test "" " callca \\(f1=1 \\+ 2i, f2=1 \\+ 2i, f3=1 \\+ 2i\\) .*" "run to call2a (complex_arg)" > > No tail parens, please. See: > > https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Do_not_use_.22tail_parentheses.22_on_test_messages Sorry, I did forget about this. I have changed the way I refactor this code. Mode of the tests are already grouped into procs, so I replace plain procs with proc_with_prefix. It also makes it easier to find the problematic portion of the file when a FAIL pop up. Thanks for the review, Lancelot --- >From 4b916043924efe7615fd16ff8440bafdd9cb163f Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Sun, 21 Nov 2021 01:38:43 +0000 Subject: [PATCH] gdb/testsuite: Remove duplicates from gdb.base/funcargs.exp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running the testsuite, I have: Running .../gdb/testsuite/gdb.base/funcargs.exp ... DUPLICATE: gdb.base/funcargs.exp: run to call2a Fix by using proc_with_prefix instead on plain proc to create logical function blocks. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/funcargs.exp | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp index 7031e02b0e5..4df87fb43cf 100644 --- a/gdb/testsuite/gdb.base/funcargs.exp +++ b/gdb/testsuite/gdb.base/funcargs.exp @@ -39,7 +39,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile $compile_flags]} # Locate actual args; integral types. # -proc integral_args {} { +proc_with_prefix integral_args {} { global gdb_prompt global det_file global gcc_compiled @@ -199,7 +199,7 @@ proc float_and_integral_args {} { # Locate actual args; _Complex types. # -proc complex_args {} { +proc_with_prefix complex_args {} { global gdb_prompt delete_breakpoints @@ -226,7 +226,7 @@ proc complex_args {} { # # Locate actual args; _Complex types and integral. # -proc complex_integral_args {} { +proc_with_prefix complex_integral_args {} { global gdb_prompt delete_breakpoints @@ -244,7 +244,7 @@ proc complex_integral_args {} { # # Locate actual args; _Complex types and integral/float. # -proc complex_float_integral_args {} { +proc_with_prefix complex_float_integral_args {} { global gdb_prompt delete_breakpoints @@ -263,7 +263,7 @@ proc complex_float_integral_args {} { # Locate actual args; dereference pointers to ints and floats. # -proc pointer_args {} { +proc_with_prefix pointer_args {} { global gdb_prompt global hex global det_file @@ -306,7 +306,7 @@ proc pointer_args {} { # Locate actual args; structures and unions passed by reference. # -proc structs_by_reference {} { +proc_with_prefix structs_by_reference {} { global gdb_prompt global hex global det_file @@ -355,7 +355,7 @@ proc structs_by_reference {} { # Locate actual args; structures and unions passed by value. # -proc structs_by_value {} { +proc_with_prefix structs_by_value {} { global gdb_prompt global hex global det_file @@ -415,7 +415,7 @@ proc structs_by_value {} { # Locate actual args; discard, shuffle, and call # -proc discard_and_shuffle {} { +proc_with_prefix discard_and_shuffle {} { global gdb_prompt global hex global decimal @@ -617,7 +617,7 @@ proc discard_and_shuffle {} { # Locate actual args; shuffle round robin and call # -proc shuffle_round_robin {} { +proc_with_prefix shuffle_round_robin {} { global gdb_prompt global hex global decimal @@ -814,7 +814,7 @@ proc shuffle_round_robin {} { # Locate actual args; recursive passing of structs by value # -proc recursive_structs_by_value {} { +proc_with_prefix recursive_structs_by_value {} { global gdb_prompt global hex global decimal @@ -844,7 +844,7 @@ proc recursive_structs_by_value {} { # # Test for accessing local stack variables in functions which call alloca # -proc localvars_after_alloca { } { +proc_with_prefix localvars_after_alloca { } { global gdb_prompt global hex global decimal @@ -878,7 +878,7 @@ proc localvars_after_alloca { } { gdb_test "backtrace 8" "#0.*localvars_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#1.*main.*" "backtrace after alloca" } -proc call_after_alloca { } { +proc_with_prefix call_after_alloca { } { global gdb_prompt global hex global decimal @@ -907,7 +907,7 @@ proc call_after_alloca { } { # and finally stepping into indirect calls. The point is that on the PA # these use a funky `dyncall' mechanism which GDB needs to know about. # -proc localvars_in_indirect_call { } { +proc_with_prefix localvars_in_indirect_call { } { global gdb_prompt global hex global decimal @@ -979,7 +979,7 @@ proc localvars_in_indirect_call { } { # cascaded) on both the call path and the gdb_suppress_tests; path. # to handle trampolines. # -proc test_stepping_over_trampolines { } { +proc_with_prefix stepping_over_trampolines { } { global gdb_prompt global hex global decimal @@ -1106,6 +1106,6 @@ recursive_structs_by_value localvars_after_alloca call_after_alloca localvars_in_indirect_call -test_stepping_over_trampolines +stepping_over_trampolines set timeout $prev_timeout -- 2.34.0