Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix DUPLICATEs in gdb.dwarf2/implptr-64bit.exp
Date: Fri, 24 Sep 2021 12:41:22 +0200	[thread overview]
Message-ID: <20210924104121.GA1592@delia> (raw)

Hi,

When running test-case gdb.dwarf2/implptr-64bit.exp with target board
unix/-m32, I noticed:
...
DUPLICATE: gdb.dwarf2/implptr-64bit.exp: failed to prepare
...

Fix this by using with_test_prefix.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix DUPLICATEs in gdb.dwarf2/implptr-64bit.exp

---
 gdb/testsuite/gdb.dwarf2/implptr-64bit.exp | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
index 03bf8c8977e..19f5ecb7929 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
@@ -21,11 +21,9 @@ if {![dwarf2_support]} {
 
 standard_testfile main.c
 
-proc test { dwarf_version offset_size addr_size ref_addr_size two_cu } {
+proc test_1 { name dwarf_version offset_size addr_size ref_addr_size two_cu } {
     global testfile srcfile
 
-    set name "d${dwarf_version}o${offset_size}a${addr_size}r${ref_addr_size}t${two_cu}"
-
     # Make some DWARF for the test.
     set asm_file [standard_output_file ${testfile}-${name}.S]
     Dwarf::assemble $asm_file {
@@ -137,7 +135,23 @@ proc test { dwarf_version offset_size addr_size ref_addr_size two_cu } {
 	return -1
     }
 
-    gdb_test "p/x p->f" " = 0x1010101" $name
+    gdb_test "p/x p->f" " = 0x1010101"
+}
+
+proc test { dwarf_version offset_size addr_size ref_addr_size two_cu } {
+
+    set name \
+	[list \
+	     "d${dwarf_version}" \
+	     "o${offset_size}" \
+	     "a${addr_size}" \
+	     "r${ref_addr_size}" \
+	     "t${two_cu}"]
+    set name [join $name "-"]
+    with_test_prefix $name {
+	test_1 $name \
+	    $dwarf_version $offset_size $addr_size $ref_addr_size $two_cu
+    }
 }
 
 #    DWARF_VERSION OFFSET_SIZE ADDR_SIZE REF_ADDR_SIZE TWO_CU

                 reply	other threads:[~2021-09-24 10:42 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=20210924104121.GA1592@delia \
    --to=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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