From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 22/29] gdb/testsuite: Remove duplicates from gdb.base/funcargs.exp
Date: Thu, 16 Dec 2021 23:08:55 +0000 [thread overview]
Message-ID: <20211216230831.gzisliwejevx3tzi@Plymouth> (raw)
In-Reply-To: <8cddbea1-6388-f2c0-f751-9af6b40f8273@palves.net>
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 <lsix@lancelotsix.com>
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
next prev parent reply other threads:[~2021-12-16 23:09 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-21 17:56 [PATCH 00/29] Remove DUPLICATEs from testsuite/gdb.base/*.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 01/29] gdb/testsuite: Remove duplicates from gdb.base/stack-checking.exp Lancelot SIX via Gdb-patches
2022-01-04 13:59 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 02/29] gdb/testsuite: Remove duplicates from gdb.base/miscexprs.exp Lancelot SIX via Gdb-patches
2021-12-10 22:06 ` Pedro Alves
2021-12-14 23:28 ` Lancelot SIX via Gdb-patches
2021-12-15 11:52 ` Pedro Alves
2022-01-04 14:00 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 03/29] gdb/testsuite: Remove duplicates from gdb.base/interp.exp Lancelot SIX via Gdb-patches
2021-11-22 14:13 ` Pedro Alves
2021-11-22 17:33 ` Lancelot SIX via Gdb-patches
2021-12-10 22:01 ` Pedro Alves
2021-11-21 17:56 ` [PATCH 04/29] gdb/testsuite: Remove duplicates from gdb.base/realname-expand.exp Lancelot SIX via Gdb-patches
2022-01-04 14:06 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 05/29] gdb/testsuite: Remove duplicates from gdb.base/pie-fork.exp Lancelot SIX via Gdb-patches
2022-01-04 14:07 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 06/29] gdb/testsuite: Remove duplicates from gdb.base/checkpoint.exp Lancelot SIX via Gdb-patches
2022-01-04 14:11 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 07/29] gdb/testsuite: Remove duplicates from gdb.base/pending.exp Lancelot SIX via Gdb-patches
2022-01-04 14:12 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 08/29] gdb/testsuite: Remove duplicates from gdb.base/decl-before-def.exp Lancelot SIX via Gdb-patches
2022-01-04 14:13 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 09/29] gdb/testsuite: Remove duplicates from gdb.base/solib-display.exp Lancelot SIX via Gdb-patches
2022-01-04 14:17 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 10/29] gdb/testsuite: Remove duplicates from gdb.base/del.exp Lancelot SIX via Gdb-patches
2022-01-04 14:20 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 11/29] gdb/testsuite: Remove duplicates from gdb.base/dfp-test.exp Lancelot SIX via Gdb-patches
2022-01-04 14:26 ` Andrew Burgess via Gdb-patches
2022-01-05 22:03 ` Lancelot SIX via Gdb-patches
2022-01-06 9:34 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 12/29] gdb/testsuite: Remove duplicates from gdb.base/ptype.exp Lancelot SIX via Gdb-patches
2022-01-04 15:13 ` Andrew Burgess via Gdb-patches
2021-11-21 17:56 ` [PATCH 13/29] gdb/testsuite: Remove duplicates from gdb.base/dfp-exprs.exp Lancelot SIX via Gdb-patches
2021-12-10 23:03 ` Pedro Alves
2021-12-15 0:01 ` Lancelot SIX via Gdb-patches
2021-12-15 11:54 ` Pedro Alves
2021-11-21 17:56 ` [PATCH 14/29] gdb/testsuite: Remove duplicates from gdb.base/subst.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 15/29] gdb/testsuite: Remove duplicates from gdb.base/complete-empty.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 16/29] gdb/testsuite: Remove duplicates from gdb.base/ui-redirect.exp Lancelot SIX via Gdb-patches
2021-12-10 23:15 ` Pedro Alves
2021-12-15 0:26 ` Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 17/29] gdb/testsuite: Remove duplicates from gdb.base/pretty-array.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 18/29] gdb/testsuite: Remove duplicates from gdb.base/readline.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 19/29] gdb/testsuite: Remove duplicates from gdb.base/exprs.exp Lancelot SIX via Gdb-patches
2021-12-10 23:15 ` Pedro Alves
2021-12-15 0:21 ` Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 20/29] gdb/testsuite: Remove duplicates from gdb.base/set-cfd.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 21/29] gdb/testsuite: Remove duplicates from gdb.base/shlib-call.exp Lancelot SIX via Gdb-patches
2021-12-10 23:24 ` Pedro Alves
2021-12-16 22:57 ` Lancelot SIX via Gdb-patches
2021-12-17 11:58 ` Pedro Alves
2021-11-21 17:56 ` [PATCH 22/29] gdb/testsuite: Remove duplicates from gdb.base/funcargs.exp Lancelot SIX via Gdb-patches
2021-12-10 23:26 ` Pedro Alves
2021-12-16 23:08 ` Lancelot SIX via Gdb-patches [this message]
2021-12-17 12:00 ` Pedro Alves
2021-11-21 17:56 ` [PATCH 23/29] gdb/testsuite: Remove duplicates from gdb.base/define-prefix.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 24/29] gdb/testsuite: Remove duplicates from gdb.base/unload.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 25/29] gdb/testsuite: Remove duplicates from gdb.base/pointers.exp Lancelot SIX via Gdb-patches
2021-12-10 23:27 ` Pedro Alves
2021-12-16 23:14 ` Lancelot SIX via Gdb-patches
2021-12-17 12:18 ` Pedro Alves
2021-12-17 23:14 ` Lancelot SIX via Gdb-patches
2022-01-05 16:05 ` Pedro Alves
2021-11-21 17:56 ` [PATCH 26/29] gdb/testsuite: Remove duplicates from gdb.base/call-signal-resume.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 27/29] gdb/testsuite: Remove duplicates from gdb.base/nested-subp2.exp Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 28/29] gdb/testsuite: Remove duplicates from gdb.base/watchpoints.exp Lancelot SIX via Gdb-patches
2021-12-10 23:30 ` Pedro Alves
2021-12-16 23:15 ` Lancelot SIX via Gdb-patches
2021-11-21 17:56 ` [PATCH 29/29] gdb/testsuite: Remove duplicates from gdb.base/corefile-buildid.exp Lancelot SIX via Gdb-patches
2021-12-10 23:38 ` Pedro Alves
2021-12-10 23:40 ` [PATCH 00/29] Remove DUPLICATEs from testsuite/gdb.base/*.exp Pedro Alves
2021-12-18 0:39 ` Lancelot SIX via Gdb-patches
2022-01-05 16:23 ` Pedro Alves
2022-01-07 22:36 ` Lancelot SIX via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211216230831.gzisliwejevx3tzi@Plymouth \
--to=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
--cc=pedro@palves.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox