Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 10/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-language.exp
Date: Thu, 16 Dec 2021 23:59:43 +0000	[thread overview]
Message-ID: <20211216235943.e7bofy6q7yja4wgf@Plymouth> (raw)
In-Reply-To: <4a9abcaf-c1e5-99a2-5c52-54a260769d08@palves.net>

On Fri, Dec 10, 2021 at 09:56:51PM +0000, Pedro Alves wrote:
> On 2021-11-26 23:00, Lancelot SIX via Gdb-patches wrote:
> > When running the testsuite, I have:
> > 
> >     Running .../gdb/testsuite/gdb.mi/mi-language.exp ...
> >     DUPLICATE: gdb.mi/mi-language.exp: set lang ada
> > 
> > Fix the erroneous test name.
> > 
> > Tested on x86_64-linux.
> > ---
> >  gdb/testsuite/gdb.mi/mi-language.exp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/gdb/testsuite/gdb.mi/mi-language.exp b/gdb/testsuite/gdb.mi/mi-language.exp
> > index d1e4503b6f9..a4e946e3789 100644
> > --- a/gdb/testsuite/gdb.mi/mi-language.exp
> > +++ b/gdb/testsuite/gdb.mi/mi-language.exp
> > @@ -45,7 +45,7 @@ mi_gdb_test "-data-evaluate-expression --language c \"sizeof (void*)\"" \
> >  # Double-check that the current language has not changed.
> >  mi_gdb_test "show lang ada" \
> >              ".*The current source language is \\\\\"ada\\\\\".*" \
> > -            "set lang ada"
> > +            "show lang ada"
> >  
> 
> FYI, you can also just remove the last argument, as it defaults to the command string.
> Less duplication that way.

Done.

Thanks for the review.

Lancelot

---
From da0cd214af2e410e1994cfa9f3b7f4d99e768d09 Mon Sep 17 00:00:00 2001
From: Lancelot SIX <lsix@lancelotsix.com>
Date: Tue, 23 Nov 2021 15:15:57 +0000
Subject: [PATCH] gdb/testsuite: Remove duplicates from gdb.mi/mi-language.exp

When running the testsuite, I have:

    Running .../gdb/testsuite/gdb.mi/mi-language.exp ...
    DUPLICATE: gdb.mi/mi-language.exp: set lang ada

This is due to an erroneous explicit test name.  This explicit test name
also happens to be useless (at least it would have been if it was
correct) since it only repeats the command, so just remove the explicit
test name and let the command be used as default test name.  Also remove
explicit test name at another location in the file since it also just
repeat the command.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.mi/mi-language.exp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-language.exp b/gdb/testsuite/gdb.mi/mi-language.exp
index d1e4503b6f9..c98eb0a8142 100644
--- a/gdb/testsuite/gdb.mi/mi-language.exp
+++ b/gdb/testsuite/gdb.mi/mi-language.exp
@@ -28,8 +28,7 @@ mi_gdb_test "-list-features" \
             "-list-features should include \"language-option\""
 
 mi_gdb_test "set lang ada" \
-            ".*=cmd-param-changed,param=\"language\",value=\"ada\".*" \
-            "set lang ada"
+            ".*=cmd-param-changed,param=\"language\",value=\"ada\".*"
 
 # Evaluate an expression that the Ada language is unable to parse.
 mi_gdb_test "-data-evaluate-expression \"sizeof (void*)\"" \
@@ -44,8 +43,7 @@ mi_gdb_test "-data-evaluate-expression --language c \"sizeof (void*)\"" \
 
 # Double-check that the current language has not changed.
 mi_gdb_test "show lang ada" \
-            ".*The current source language is \\\\\"ada\\\\\".*" \
-            "set lang ada"
+            ".*The current source language is \\\\\"ada\\\\\".*"
 
 # Test what happens when specifying an invalid language name...
 mi_gdb_test "-data-evaluate-expression --language invlang \"sizeof (void*)\"" \
-- 
2.34.0


  reply	other threads:[~2021-12-17  0:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 23:00 [PATCH 00/12] Remove DUPLICATEs warnings Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 01/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-syn-frame.exp Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 02/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-nsthrexec.exp Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 03/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-watch.exp Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 04/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-catch-load.exp Lancelot SIX via Gdb-patches
2021-12-10 21:55   ` Pedro Alves
2021-12-16 23:27     ` Lancelot SIX via Gdb-patches
2021-12-17 12:21       ` Pedro Alves
2021-11-26 23:00 ` [PATCH 05/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-var-child.exp Lancelot SIX via Gdb-patches
2021-12-10 21:55   ` Pedro Alves
2021-12-16 23:40     ` Lancelot SIX via Gdb-patches
2021-12-17 13:00       ` [PATCH] gdb/testsuite: Remove some duplication " Pedro Alves
2021-12-17 23:24         ` Lancelot SIX via Gdb-patches
2022-01-06 16:44           ` Pedro Alves
2021-11-26 23:00 ` [PATCH 06/12] gdb/testsuite: Remove duplicates from gdb.mi/mi2-var-child.exp Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 07/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-nonstop.exp Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 08/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-nonstop-exit.exp Lancelot SIX via Gdb-patches
2021-12-10 21:56   ` Pedro Alves
2021-12-16 23:48     ` Lancelot SIX via Gdb-patches
2021-12-17 13:52       ` Pedro Alves
2021-11-26 23:00 ` [PATCH 09/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-var-rtti.exp Lancelot SIX via Gdb-patches
2021-11-26 23:00 ` [PATCH 10/12] gdb/testsuite: Remove duplicates from gdb.mi/mi-language.exp Lancelot SIX via Gdb-patches
2021-12-10 21:56   ` Pedro Alves
2021-12-16 23:59     ` Lancelot SIX via Gdb-patches [this message]
2021-12-17 13:53       ` Pedro Alves
2021-11-26 23:00 ` [PATCH 11/12] gdb/testsuite: Remove duplicates from gdb.mi/mi2-amd64-entry-value.exp Lancelot SIX via Gdb-patches
2021-12-10 21:56   ` Pedro Alves
2021-12-17 22:57     ` Lancelot SIX via Gdb-patches
2022-01-06 16:49       ` Pedro Alves
2021-11-26 23:00 ` [PATCH 12/12] gdb/testsuite: Remove duplicates from gdb.threads/staticthreads.ex Lancelot SIX via Gdb-patches
2021-12-09 18:15 ` [PATCH 00/12] Remove DUPLICATEs warnings Tom Tromey
2021-12-10 22:01 ` Pedro Alves
2022-01-07 22:43 ` 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=20211216235943.e7bofy6q7yja4wgf@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