From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix racy test in gdb.threads/thread-specific-bp.exp
Date: Mon, 03 Apr 2017 21:06:00 -0000 [thread overview]
Message-ID: <1491253593-4116-1-git-send-email-yao.qi@linaro.org> (raw)
I see the following test fail from time to time, due to the racy test
in gdb.threads/thread-specific-bp.exp.
continue -a^M
Continuing.^M
^M
Thread 1 "thread-specific" hit Breakpoint 4, end () at binutils-gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:29^M
29 }^M
(gdb) [Thread 0x40322460 (LWP 12950) exited]^M
Thread-specific breakpoint 3 deleted - thread 2 no longer in the thread list.^M
FAIL: gdb.threads/thread-specific-bp.exp: non-stop: continue to end (timeout)
This patch changes gdb_test to gdb_test_multiple to match prompt only
instead of both prompt and anchor.
gdb/testsuite:
2017-04-03 Yao Qi <yao.qi@linaro.org>
* gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
Use gdb_test_multiple, and don't match anchor.
---
gdb/testsuite/gdb.threads/thread-specific-bp.exp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
index bdf12f8..a652e9c 100644
--- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
@@ -87,9 +87,12 @@ proc check_thread_specific_breakpoint {mode} {
} else {
set cmd "continue"
}
- gdb_test "$cmd" \
- "Breakpoint .* end .* at .*" \
- "continue to end"
+ set test "continue to end"
+ gdb_test_multiple "$cmd" $test {
+ -re "Breakpoint .* end .* at .*(\[^\r\n\]*)\r\n$gdb_prompt " {
+ pass $test
+ }
+ }
set test "thread-specific breakpoint was deleted"
gdb_test_multiple "info breakpoint" $test {
--
1.9.1
next reply other threads:[~2017-04-03 21:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 21:06 Yao Qi [this message]
2017-04-04 1:49 ` Simon Marchi
2017-04-04 8:08 ` Yao Qi
2017-04-04 13:37 ` Simon Marchi
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=1491253593-4116-1-git-send-email-yao.qi@linaro.org \
--to=qiyaoltc@gmail.com \
--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