New gdb.mi/mi-breakpoint-changed.exp racy results [Re: [PATCH] Test case on breakpoint-related notifications]

Jan Kratochvil jan.kratochvil@redhat.com
Sun Sep 30 09:08:00 GMT 2012


On Tue, 25 Sep 2012 08:01:04 +0200, Yao Qi wrote:
> 	* gdb.mi/mi-breakpoint-changed.exp: New.

Getting many racy results during nightly run:

-PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: continue to pendfunc1 breakpoint
+FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: continue to pendfunc1 breakpoint (timeout)
and
-PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved: hit_count is updated
-PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: continue to pendfunc1 breakpoint
+FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved (timeout)
+FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: continue to pendfunc1 breakpoint (timeout)
and
-FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: delete breakpoint on pendfunc1
+PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: delete breakpoint on pendfunc1

and
-PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved:
+FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: (unknown output after running)


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
-*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0xf7fd8502",func="pendfunc1",args=[],file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21"},thread-id="1",stopped-threads="all",core="5"^M
-(gdb) PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved: hit_count is updated
+*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0xf7fd8502",func="pendfunc1",args=[],file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21"},thread-id="1",stopped-threads="all",core="2"^M
+(gdb) ^M
+PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved
+FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved (timeout)
 mi_expect_stop: expecting: \*stopped,reason="breakpoint-hit",disp="keep",bkptno="[0-9]+",frame={addr="0x[0-9A-Fa-f]+",func="pendfunc1",args=\[\],(?:file="[^
 ]*.*",fullname="(/[^\n]*/|\\\\[^\\]+\\[^\n]+\\|\\[^\\][^\n]*\\|[a-zA-Z]:[^\n]*\\).*",line=".*"|from=".*")},thread-id="[0-9]+",stopped-threads=[^
 ]*^M
 (=thread-selected,id="[0-9]+"^M
 |=(?:breakpoint-created|breakpoint-deleted)[^
 ]+"^M
 )*[(]gdb[)] ^M
 $
-^M
 FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: continue to pendfunc1 breakpoint (timeout)
 Expecting: ^(-break-delete 1[^M
 ]+)?(\^done[^M
 ]+[(]gdb[)] ^M
 [ ]*)
 -break-delete 1^M
 ^done^M
 (gdb) ^M
-FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: delete breakpoint on pendfunc1
+PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: delete breakpoint on pendfunc1
 Expecting: ^(-break-insert marker[^M

and

+=breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0804869f",func="marker",file="gdb/testsuite/gdb.mi/pending.c",fullname="/unsafegdb/testsuite/gdb.mi/pending.c",line="25",times="2",original-location="marker"}^M
+*stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={addr="0x0804869f",func="marker",args=[],file="gdb/testsuite/gdb.mi/pending.c",fullname="/unsafegdb/testsuite/gdb.mi/pending.c",line="25"},thread-id="1",stopped-threads="all",core="2"^M
+(gdb) ^M
 PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: continue to marker 2
 -exec-continue^M
 ^running^M
 *running,thread-id="1"^M
 (gdb) ^M
 =library-unloaded,id="/unsafegdb/testsuite.unix.-m32/gdb.mi/pendshr2.sl",target-name="/unsafegdb/testsuite.unix.-m32/gdb.mi/pendshr2.sl",host-name="/unsafegdb/testsuite.unix.-m32/gdb.mi/pendshr2.sl",thread-group="i1"^M
 =breakpoint-modified,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="pendfunc3",times="0",original-location="pendfunc3"}^M
 &"warning: Temporarily disabling breakpoints for unloaded shared library \"/unsafegdb/testsuite.unix.-m32/gdb.mi/pendshr2.sl\"\n"^M
 =thread-exited,id="1",group-id="i1"^M
 =thread-group-exited,id="i1",exit-code="0"^M
 *stopped,reason="exited-normally"^M
 (gdb) ^M
 PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc3 pending again
 FAIL: gdb.mi/mi-breakpoint-changed.exp: pending resolved: (unknown output after running)
-testcase gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp completed in 22 seconds
+testcase gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp completed in 31 seconds

etc.

Do you have an idea for a fix?


Thanks,
Jan



More information about the Gdb-patches mailing list