]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix duplicates in gdb.base/watchpoint-unaligned.exp
authorTom de Vries <tdevries@suse.de>
Thu, 20 Jun 2024 13:37:48 +0000 (15:37 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 20 Jun 2024 13:37:48 +0000 (15:37 +0200)
When running test-case gdb.base/watchpoint-unaligned.exp on ppc64le-linux, we
get:
...
XFAIL: $exp: rwatch data.u.size1[3] (PRMS breakpoints/23131)
XFAIL: $exp: rwatch data.u.size1[4] (PRMS breakpoints/23131)
  ...
UNTESTED: $exp: wpcount(4)
XFAIL: $exp: rwatch data.u.size1[3] (PRMS breakpoints/23131)
DUPLICATE: $exp: rwatch data.u.size1[3] (PRMS breakpoints/23131)
XFAIL: $exp: rwatch data.u.size1[4] (PRMS breakpoints/23131)
DUPLICATE: $exp: rwatch data.u.size1[4] (PRMS breakpoints/23131)
  ...
UNTESTED: $exp: wpcount(7)
...

Fix this by using foreach_with_prefix.

Tested on ppc64le-linux.

gdb/testsuite/gdb.base/watchpoint-unaligned.exp

index 35e8868d39d0c74353f0d152ba0fa49af33d08ef..999dd3a85ed806156c494ff609fb02a8ff063c07 100644 (file)
@@ -98,7 +98,7 @@ foreach wpsize $sizes {
     }
 }
 
-foreach wpcount {4 7} {
+foreach_with_prefix wpcount {4 7} {
     array set wpoffset_to_wpnum {}
     for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} {
        set test "$rwatch data.u.size1\[$wpoffset\]"