]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix DUPLICATEs in gdb.threads/tls.exp
authorTom de Vries <tdevries@suse.de>
Thu, 29 Oct 2020 06:55:46 +0000 (07:55 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 29 Oct 2020 06:55:46 +0000 (07:55 +0100)
With test-case gdb.threads/tls.exp, we get these:
...
DUPLICATE: gdb.threads/tls.exp: selected thread: 4
DUPLICATE: gdb.threads/tls.exp: selected thread: 2
DUPLICATE: gdb.threads/tls.exp: selected thread: 3
...

Fix these using with_test_prefix.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-29  Tom de Vries  <tdevries@suse.de>

* gdb.threads/tls.exp: Fix DUPLICATEs.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/tls.exp

index ee8f729cbf43596ebd560e5f65d4298f49c9adba..24bc0d82c4721743cb0623f849b3c7077e36b193 100644 (file)
@@ -1,3 +1,7 @@
+2020-10-29  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.threads/tls.exp: Fix DUPLICATEs.
+
 2020-10-28  Tom de Vries  <tdevries@suse.de>
 
        * gdb.python/py-symbol.exp: Add KFAILs for -readnow.
index 8147a6c132737cce3c60f666e63a5733194d248c..77916e758daddaf704281ca339e65367dbc5e05a 100644 (file)
@@ -127,7 +127,9 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
     upvar $spin_threads tarr
     upvar $spin_threads_level tarrl
 
-    select_thread $number
+    with_test_prefix "thread stack" {
+       select_thread $number
+    }
     send_gdb "where\n"
     gdb_expect {
        -re ".*(\[0-9\]+)\[ \t\]+$hex in spin \\(vp=(0x\[0-9a-f\]+).*\r\n$gdb_prompt $" {
@@ -257,7 +259,10 @@ set thrs_in_spin 0
 foreach i [array names spin_threads] {
     if {$spin_threads($i) == 1} {
       incr thrs_in_spin
-      select_thread $i
+
+      with_test_prefix "spin_threads" {
+       select_thread $i
+      }
       set level $spin_threads_level($i)
       # We expect to be in sem_wait, but if the thread has not yet
       # been scheduled, we might be in sem_post still.  We could be at