This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix racy test in gdb.threads/thread-specific-bp.exp
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 03 Apr 2017 21:49:01 -0400
- Subject: Re: [PATCH] Fix racy test in gdb.threads/thread-specific-bp.exp
- Authentication-results: sourceware.org; auth=none
- References: <1491253593-4116-1-git-send-email-yao.qi@linaro.org>
On 2017-04-03 17:06, Yao Qi wrote:
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 " {
I am not sure I understand what this is supposed to match. First are
the parenthesis useful, since we're not using any capture group? Then,
.* followed with [^\r\n]* doesn't seem useful, since the .* can just
match anything the [^\r\n]* doesn't match.
What about just this?
set test "continue to end"
gdb_test_multiple "$cmd" $test {
-re "hit Breakpoint $decimal, end \\(\\) at.*$gdb_prompt " {
pass $test
}
}
Simon