From: Bruno Larsen <blarsen@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: Avoid infinite loop in gdb.reverse/step-reverse.exp
Date: Thu, 1 Jun 2023 09:30:04 +0200 [thread overview]
Message-ID: <5f6b690b-6de1-9085-2078-7bf9cae2eb85@redhat.com> (raw)
In-Reply-To: <20230531200602.165033-1-thiago.bauermann@linaro.org>
On 31/05/2023 22:06, Thiago Jung Bauermann via Gdb-patches wrote:
> This testcase sometimes gets stuck in a loop for hours when running in our
> CI. The problem is that due to an issue unrelated to reverse debugging the
> inferior exits early, and because of the overly generic ".*" pattern the
> testcase keeps sending the "next" command without noticing that the
> inferior is gone.
>
> gdb_test_multiple has a pattern to detect that "The program is not being
> run.", but since it is placed after the patterns from the caller it won't
> be triggered. It also has a timeout pattern, but for some reason I don't
> understand it often doesn't trigger.
>
> Since the test binary is compiled with debug information, fix by changing
> the pattern to match the source code line number that is shown by GDB right
> after the "step" command.
> ---
Oops, sorry about that, that never even crossed my mind. This change
looks pretty simple IMO.
Reviewed-By: Bruno Larsen <blarsen@redhat.com>
--
Cheers,
Bruno
> gdb/testsuite/gdb.reverse/step-reverse.exp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp
> index 729218d4cb8c..766ca02910af 100644
> --- a/gdb/testsuite/gdb.reverse/step-reverse.exp
> +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp
> @@ -261,7 +261,7 @@ if { "$step_out" == 1 } {
> -re -wrap "NEXT OVER THIS RECURSION.*" {
> set step_out 0
> }
> - -re -wrap ".*" {
> + -re -wrap "^\[0-9\].*" {
> send_gdb "next\n"
> exp_continue
> }
> @@ -286,7 +286,7 @@ gdb_test_multiple "next" "step over recursion inside the recursion" {
> gdb_assert {"$seen_recursive_call" == 1} \
> "step over recursion inside the recursion"
> }
> - -re -wrap ".*" {
> + -re -wrap "^\[0-9\].*" {
> send_gdb "next\n"
> exp_continue
> }
>
next prev parent reply other threads:[~2023-06-01 7:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 20:06 Thiago Jung Bauermann
2023-06-01 7:30 ` Bruno Larsen [this message]
2023-06-01 9:15 ` Tom de Vries
2023-06-01 9:40 ` Bruno Larsen
2023-06-01 13:27 ` Thiago Jung Bauermann
2023-06-01 14:04 ` Bruno Larsen
2023-06-01 21:50 ` Thiago Jung Bauermann
2023-06-01 9:32 ` Andrew Burgess
2023-06-01 13:21 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f6b690b-6de1-9085-2078-7bf9cae2eb85@redhat.com \
--to=blarsen@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).