aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-06-08 10:04:44 +0200
committerTom de Vries <tdevries@suse.de>2021-06-08 10:04:44 +0200
commit4a11703a04c64d34e79d51ad62dad176c92462c8 (patch)
tree617bf6869f757ea7061d45bda546adf8b0a1979e /gdb/testsuite
parentac6c175edd1f4574afbac8606e4954e83d061821 (diff)
downloadgdb-4a11703a04c64d34e79d51ad62dad176c92462c8.zip
gdb-4a11703a04c64d34e79d51ad62dad176c92462c8.tar.gz
gdb-4a11703a04c64d34e79d51ad62dad176c92462c8.tar.bz2
[gdb/testsuite] Fix gdb.threads/multi-create-ns-info-thr.exp
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. Tested on x86_64-linux. 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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d89ef4a..dc92125 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2021-06-08 Tom de Vries <tdevries@suse.de>
+ * gdb.threads/multi-create-ns-info-thr.exp: Limit breakpoint regexp to
+ one line.
+
+2021-06-08 Tom de Vries <tdevries@suse.de>
+
* gdb.base/sect-cmd.exp: Use gdb_test. Use -wrap "". Fix
test name.
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 2fb5223..1b32637 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
}
}