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

Message ID 87zjgobth0.fsf@Argo.krisman.be
State New, archived
Headers

Commit Message

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

> Thanks, this is great :-).

Thanks for your review.

> BTW, I recommend that this testcase be simplified.  Instead of:

I applied your suggestions.  Below is a new version of the patch that
simplifies the testcase.
  

Comments

Sergio Durigan Junior July 5, 2014, 12:14 p.m. UTC | #1
On Friday, July 04 2014, Gabriel Krisman Bertazi wrote:

>> BTW, I recommend that this testcase be simplified.  Instead of:
>
> I applied your suggestions.  Below is a new version of the patch that
> simplifies the testcase.

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

Now it's just a matter of waiting for a maintainer's review/approval :-).

> 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"
  

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"