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]

gdb.base/break.exp: Mark failures as such


Hello,

 A few tests in gdb.base/break.exp incorrectly flag their catch-all 
pattern as a success.  Here is a fix, including some reformatting which 
actually makes makes them readable (the current opposite state probably 
being responsible for the problem).

2008-03-28  Maciej W. Rozycki  <macro@mips.com>

	* gdb.base/break.exp: Mark failures as such.  Fix formatting.

 Almost obvious, but just in case: OK to apply?

  Maciej

14589.diff
Index: gdb/src/gdb/testsuite/gdb.base/break.exp
===================================================================
--- gdb.orig/src/gdb/testsuite/gdb.base/break.exp	2007-02-13 16:35:28.000000000 +0000
+++ gdb/src/gdb/testsuite/gdb.base/break.exp	2007-02-13 16:40:43.000000000 +0000
@@ -298,9 +298,15 @@
 #
 send_gdb "tbreak $bp_location1\n"
 gdb_expect {
-    -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
-	-re ".*$gdb_prompt $"   { pass "Temporary breakpoint line number #1" }
-	timeout	    { fail "breakpoint line number #1 (timeout)" }
+    -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" {
+	pass "Temporary breakpoint line number #1"
+    }
+    -re ".*$gdb_prompt $" {
+	fail "Temporary breakpoint line number #1"
+    }
+    timeout {
+	fail "breakpoint line number #1 (timeout)"
+    }
 }
 
 gdb_test "tbreak $bp_location6" "Breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
@@ -310,9 +316,15 @@
 #
 send_gdb "tbreak $srcfile:$bp_location2\n"
 gdb_expect {
-    -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
-	-re ".*$gdb_prompt $"   { pass "Temporary breakpoint line number in file #1" }
-	timeout	    { fail "Temporary breakpoint line number in file #1 (timeout)" }
+    -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" {
+	pass "Temporary breakpoint line number in file #1"
+    }
+    -re ".*$gdb_prompt $" {
+	fail "Temporary breakpoint line number in file #1"
+    }
+    timeout {
+	fail "Temporary breakpoint line number in file #1 (timeout)"
+    }
 }
 
 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]


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