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: New gdb.mi/mi-breakpoint-changed.exp racy results [Re: [PATCH] Test case on breakpoint-related notifications]


On 09/30/2012 05:07 PM, Jan Kratochvil wrote:
> I do not have it reproducible, even PR 12649 'read1' does not work for it.
> It looks like:
> 
>   =library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0",thread-group="i1"^M
> -=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="0",original-location="pendfunc1"}PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved
> -^M
> +=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="0",original-location="pendfunc1"}^M
>   =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="1",original-location="pendfunc1"}^M

I can't reproduce it either on my system.  However, it looks like fail
is caused by some trail ".*" in patterns, because trail ".*" is
ambiguous on how many characters will be matched.  The patch below
should fix the fail.

-- 
Yao

gdb/testsuite:

2012-10-07  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved): Remove
	trail '.*' on matching patterns.
---
 gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
index c3abd74..773f588 100644
--- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
@@ -163,11 +163,11 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
 
     set test "breakpoint on pendfunc1 resolved"
     gdb_expect {
-	-re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\".*" {
+	-re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\"" {
 	    pass $test
 	    exp_continue
 	}
-	-re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\".*" {
+	-re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\"" {
 	    pass "$test: hit_count is updated"
 	}
 	-re ".*${mi_gdb_prompt}$" {
@@ -219,7 +219,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
     mi_send_resuming_command "exec-continue" "continuing to exit"
     set test "breakpoint on pendfunc3 pending again"
     gdb_expect {
-	-re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"<PENDING>\".*" {
+	-re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"<PENDING>\"" {
 	    pass $test
 	}
 	-re ".*${mi_gdb_prompt}$" {
-- 
1.7.7.6


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