diff options
author | Tom de Vries <tdevries@suse.de> | 2021-09-24 12:39:15 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-09-24 12:39:15 +0200 |
commit | d8f2441d856b3b57bbd3b3c60496ca30678f1b8f (patch) | |
tree | 40544936656f49fc7968b3916ae73535f3c4bf3f /gdb/testsuite | |
parent | 11a607f8cb5f2999569b44fe08ee0e0acd0f4c3c (diff) | |
download | gdb-d8f2441d856b3b57bbd3b3c60496ca30678f1b8f.zip gdb-d8f2441d856b3b57bbd3b3c60496ca30678f1b8f.tar.gz gdb-d8f2441d856b3b57bbd3b3c60496ca30678f1b8f.tar.bz2 |
[gdb/testsuite] Fix DUPLICATEs in gdb.dwarf2/implptr-64bit.exp
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/implptr-64bit.exp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp index 03bf8c8..19f5ecb 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 |