This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 10 Sep 2014 05:50:37 -0700
- Subject: Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.
- Authentication-results: sourceware.org; auth=none
- References: <m3pphk9f53 dot fsf at redhat dot com> <8761jbbu6l dot fsf at Argo dot krisman dot be> <m3bnt28g3s dot fsf at redhat dot com> <87lhrv36pm dot fsf at Argo dot krisman dot be> <87zjf3sqrd dot fsf at krisman dot be> <87r4048546 dot fsf_-_ at krisman dot be> <20140909130901 dot GG28404 at adacore dot com> <87d2b4c07h dot fsf at anubis dot Home> <20140909154531 dot GJ28404 at adacore dot com> <87ppf4acb5 dot fsf at anubis dot Home>
>
> Joel, thanks for your clarification.
>
> Ok, so we got this situation:
>
> The original testcase sets a breakpoint at the label continue and
> resumes execution until we reach it. On the Fortran file, this means
> the inferior has iterated over the whole loop before reaching the
> breakpoint for the first time. Then, the original testcase issues
> another continue command, causing the inferior to finish the execution
> earlier than expected, since we still want to make a final test on
> whether we print the second element. This causes the two test failures.
>
> My guess is that the original author meant to break after each loop
> iteration, instead of going all the way until the continue label.
>
> Nevertheless, stepping over a single iteration or stopping after the
> entire loop has no impact on the test results. So, what my patch does
> is simply remove the second "continue" command that would prematurely
> end inferior's execution, so we can actually test whether both elements
> are printed correctly after executing the loop.
>
> Other than that, when I first submitted this patch, Sergio asked me to
> simplify the testcase, because it felt unusual. That is what the other
> modifications are about.
OK, thank you for the explanation of the issue.
> 2014-08-17 Gabriel Krisman Bertazi <gabriel@krisman.be>
>
> * gdb.fortran/array-element.exp: Remove wrong "continue"
> command. Simplify test case.
OK to push.
My only comment is that simplications are indeed good, but it is
better if you can submit those separately from other changes.
It's easier to review the patch series that way, and it also
allows us separate the real change from the enhancement which
is expected to be a no-op.
Thanks :)
--
Joel