This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix racy test in gdb.threads/thread-specific-bp.exp


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]