Fix gdb.fortran/array-element.exp failures.

Message ID 8761jbbu6l.fsf@Argo.krisman.be
State New, archived
Headers

Commit Message

Gabriel Krisman Bertazi July 5, 2014, 5:18 p.m. UTC
  Sergio Durigan Junior <sergiodj@redhat.com> writes:

> Thanks!  It is missing a (new) ChangeLog entry; other than that, I
> believe it is fine to be applied.
>

Sorry, I missed it. Here follows the patch and the updated changelog.

2014-07-05  Gabriel Krisman Bertazi  <gabriel@krisman.be>

	* array-element.exp: Remove wrong "continue" command that caused
	test to fail and simplifies test case.
  

Comments

Sergio Durigan Junior July 6, 2014, 7:03 p.m. UTC | #1
On Saturday, July 05 2014, Gabriel Krisman Bertazi wrote:

> Sorry, I missed it. Here follows the patch and the updated changelog.
>
> 2014-07-05  Gabriel Krisman Bertazi  <gabriel@krisman.be>
>
> 	* array-element.exp: Remove wrong "continue" command that caused
> 	test to fail and simplifies test case.

It should be:

	* gdb.fortran/array-element.exp

Also, and sorry for the nitpicking, but we write ChangeLog entries in
the imperative mode, so I'd write it as:

	* gdb.fortran/array-element.exp: Remove wrong "continue"
	  command.  Simplify test case.

Anyway, just minor comments, no need to resubmit the patch.  Let's wait
for some maintainer to take a look.

Thanks,
  
Gabriel Krisman Bertazi July 14, 2014, 10:40 p.m. UTC | #2
> Anyway, just minor comments, no need to resubmit the patch.  Let's wait
> for some maintainer to take a look.
>

Ping for this patch.
  

Patch

diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp
index 579db03..1ac3623 100644
--- a/gdb/testsuite/gdb.fortran/array-element.exp
+++ b/gdb/testsuite/gdb.fortran/array-element.exp
@@ -31,18 +31,9 @@  if ![runto sub_] then {
     continue
 }
 
-set bp_location [gdb_get_line_number "continue"]
-gdb_test "break $bp_location" \
-    "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
-    "breakpoint at continue"
-
-gdb_test "continue" \
-    "Continuing\\..*Breakpoint.*" \
-    "continue to breakpoint"
-gdb_test "print a(1)" ".*1 = 1.*" "print the first element of array a"
+gdb_breakpoint [gdb_get_line_number "continue"]
+gdb_continue_to_breakpoint "continue"
 
-gdb_test "continue" \
-    "Continuing\\..*Breakpoint.*" \
-    "continue to breakpoint once again"
+gdb_test "print a(1)" ".*1 = 1.*" "print the first element of array a"
 gdb_test "print a(2)" ".*2 = 2.*" "print the second element of array a"