Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.threads/multi-create-ns-info-thr.exp
Date: Tue, 8 Jun 2021 10:06:29 +0200	[thread overview]
Message-ID: <20210608080628.GA14656@delia> (raw)

Hi,

With a testsuite setup modified to make expect wait a little bit longer for
gdb output (see PR27957), I reliably run into:
...
PASS: gdb.threads/multi-create-ns-info-thr.exp: continue to breakpoint 1
FAIL: gdb.threads/multi-create-ns-info-thr.exp: continue to breakpoint 2 \
  (timeout)
...

This is due to this regexp:
...
       -re "Breakpoint $decimal,.*$srcfile:$bp_location1" {
...
consuming several lines using the ".*" part, while it's intended to match one
line looking like this:
...
Thread 1 "multi-create-ns" hit Breakpoint 2, create_function () \
  at multi-create.c:45^M
...

Fix this by limiting the regexp to one line.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.threads/multi-create-ns-info-thr.exp

gdb/testsuite/ChangeLog:

2021-06-08  Tom de Vries  <tdevries@suse.de>

	* gdb.threads/multi-create-ns-info-thr.exp: Limit breakpoint regexp to
	one line.

---
 gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp b/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
index 2fb52238798..1b32637e877 100644
--- a/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
+++ b/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
@@ -45,7 +45,7 @@ gdb_test_multiple $test $test {
 for {set i 0} {$i < 32} {incr i} {
     set test "continue to breakpoint $i"
     gdb_test_multiple "" $test {
-	-re "Breakpoint $decimal,.*$srcfile:$bp_location1" {
+	-re "Breakpoint $decimal,\[^\r\n\]*$srcfile:$bp_location1" {
 	    pass $test
 	}
     }

                 reply	other threads:[~2021-06-08  8:06 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=20210608080628.GA14656@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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