public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.threads/multiple-successive-infcall.exp on native-gdbserver
@ 2023-03-09 11:56 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-09 11:56 UTC (permalink / raw)
  To: gdb-cvs

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

commit f2be4eeb6ce93e4dfab259587bcaf5cb861fc25b
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Mar 9 12:56:27 2023 +0100

    [gdb/testsuite] Fix gdb.threads/multiple-successive-infcall.exp on native-gdbserver
    
    With test-case gdb.threads/multiple-successive-infcall.exp and target board
    native-gdbserver I run into:
    ...
    (gdb) continue^M
    Continuing.^M
    [New Thread 758.759]^M
    ^M
    Thread 1 "multiple-succes" hit Breakpoint 2, main () at \
      multiple-successive-infcall.c:97^M
    97            thread_ids[tid] = tid + 2; /* prethreadcreationmarker */^M
    (gdb) FAIL: gdb.threads/multiple-successive-infcall.exp: thread=5: \
      created new thread
    ...
    
    The problem is that the new thread message doesn't match the regexp, which
    expects something like this instead:
    ...
    [New Thread 0x7ffff746e700 (LWP 570)]^M
    ...
    
    Fix this by accepting this form of new thread message.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.threads/multiple-successive-infcall.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
index f33cba62855..bd037a02674 100644
--- a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
+++ b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
@@ -40,6 +40,9 @@ foreach_with_prefix thread {5 4 3}  {
     -re "\\\[New Thread ${hex} \\\(LWP \[0-9\]+\\\)\\\].*${gdb_prompt}" {
       pass "${after_new_thread_message}"
     }
+    -re -wrap "\\\[New Thread $decimal\\.$decimal\\\]\r\n.*" {
+      pass $gdb_test_name
+    }
   }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-09 11:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 11:56 [binutils-gdb] [gdb/testsuite] Fix gdb.threads/multiple-successive-infcall.exp on native-gdbserver Tom de Vries

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).