This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix intermittent failures in breakpoint-shadow.exp.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Thu, 10 Sep 2009 15:33:57 -0700 (PDT)
- Subject: [commit] Fix intermittent failures in breakpoint-shadow.exp.
Hi.
I got a failure in breakpoint-shadow.exp.
gdb.log has this:
(gdb) PASS: gdb.base/breakpoint-shadow.exp: First breakpoint placed
b 24
Breakpoint 3 at 0x400397: file ../../../../src/gdb/testsuite/gdb.base/breakpoint-shadow.c, line 24.
PASS: gdb.base/breakpoint-shadow.exp: Second breakpoint placed
disass main
(gdb) FAIL: gdb.base/breakpoint-shadow.exp: disassembly with breakpoints
testcase ../../../../src/gdb/testsuite/gdb.base/breakpoint-shadow.exp completed in 1 seconds
Notice that the "disass main" command seemingly has no output.
Also note that there is no gdb prompt between the "b 24" command
and the "disass main" command.
The regexp for placing the second breakpoint needs to include
the gdb prompt (otherwise a regexp internal to gdb_test_multiple may
see it and prematurely return).
Checked in.
2009-09-10 Doug Evans <dje@google.com>
* gdb.base/breakpoint-shadow.exp: Fix intermittent failures.
Add $gdb_prompt to second breakpoint regexp.
Index: testsuite/gdb.base/breakpoint-shadow.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/breakpoint-shadow.exp,v
retrieving revision 1.3
diff -u -p -r1.3 breakpoint-shadow.exp
--- testsuite/gdb.base/breakpoint-shadow.exp 8 Sep 2009 17:39:22 -0000 1.3
+++ testsuite/gdb.base/breakpoint-shadow.exp 10 Sep 2009 22:23:46 -0000
@@ -50,7 +50,7 @@ gdb_test_multiple "disass main" $test {
gdb_test "b [gdb_get_line_number "break-first"]" "Breakpoint \[0-9\] at .*" "First breakpoint placed"
set test "Second breakpoint placed"
gdb_test_multiple "b [gdb_get_line_number "break-second"]" $test {
- -re "Breakpoint \[0-9\] at (0x\[0-9a-f\]*):.*" {
+ -re "Breakpoint \[0-9\] at (0x\[0-9a-f\]*):.*$gdb_prompt $" {
pass $test
set bpt2address $expect_out(1,string)
}