public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix duplicate in gdb.mi/mi-var-cp.exp
Date: Mon, 25 Oct 2021 16:15:18 +0000 (GMT)	[thread overview]
Message-ID: <20211025161518.EFDB33858424@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9de46719da07a439af59088d69cb4dd70c030612

commit 9de46719da07a439af59088d69cb4dd70c030612
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Oct 25 18:15:15 2021 +0200

    [gdb/testsuite] Fix duplicate in gdb.mi/mi-var-cp.exp
    
    With test-case gdb.mi/mi-var-cp.exp I run into this duplicate:
    ...
    PASS: gdb.mi/mi-var-cp.exp: run to mi-var-cp.cc:104 (set breakpoint)
    PASS: gdb.mi/mi-var-cp.exp: create varobj for s
    PASS: gdb.mi/mi-var-cp.exp: create varobj for s
    DUPLICATE: gdb.mi/mi-var-cp.exp: create varobj for s
    ...
    
    This is due to a duplicate test name here:
    ...
    $ cat -n gdb/testsuite/gdb.mi/mi-var-cp.cc
      ...
       100  int reference_to_struct ()
       101  {
       102    /*: BEGIN: reference_to_struct :*/
       103    S s = {7, 8};
       104    S& r = s;
       105    /*:
       106      mi_create_varobj S s "create varobj for s"
       107      mi_create_varobj R r "create varobj for s"
    ...
    
    Fix this by using "create varobj for r" instead.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.mi/mi-var-cp.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc
index 43323c49e60..0d4cd7b741d 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.cc
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc
@@ -104,7 +104,7 @@ int reference_to_struct ()
   S& r = s;
   /*:
     mi_create_varobj S s "create varobj for s"
-    mi_create_varobj R r "create varobj for s"
+    mi_create_varobj R r "create varobj for r"
     mi_gdb_test "-var-show-attributes S" \
 	"\\^done,attr=\"noneditable\"" \
 	"check attributes of S"


                 reply	other threads:[~2021-10-25 16:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20211025161518.EFDB33858424@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).