public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org, Andrew Burgess <aburgess@redhat.com>,
	Bruno Larsen <blarsen@redhat.com>
Subject: Re: [PATCH v3] gdb/testsuite: Avoid infinite loop in gdb.reverse/step-reverse.exp
Date: Fri, 23 Jun 2023 23:09:26 +0200	[thread overview]
Message-ID: <87bkh5homx.fsf@linaro.org> (raw)
In-Reply-To: <d055a645-faa3-0fe8-d05f-3e99e7e9dea0@suse.de>


Hello,

Tom de Vries <tdevries@suse.de> writes:

> On 6/23/23 00:52, Thiago Jung Bauermann wrote:
>> Bruno Larsen <blarsen@redhat.com> writes:
>> 
>>> On 06/06/2023 01:28, Thiago Jung Bauermann 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 because it is triggered
>>>> between successful matches, each time the test matches the '-re -wrap ".*"'
>>>> this counts as a successful match and the timeout is reset.
>>>>
>>>> Since the test binary is compiled with debug information, fix by changing
>>>> one of the generic patterns to match entering the main function and the
>>>> other one to match the source code line number that is shown by GDB right
>>>> after the "step" command.
>>>>
>>>> Also, as a precaution add a maximum number of times the "next" command will
>>>> be sent.
>>>>
>>>> Co-Authored-By: Tom de Vries <tdevries@suse.de>
>>>> ---
>>>
>>> Thanks for fixing all the nits, looks good to me now. Reviewed-By: Bruno Larsen
>>> <blarsen@redhat.com>
>>>
>>> (Just making sure you know, the rb tag is not enough to push, you need an approval)
>> 
>
> Hi,
>
> LGTM, thanks.
>
> Approved-By: Tom de Vries <tdevries@suse.de>

Thank you! I have just pushed it.

-- 
Thiago

      reply	other threads:[~2023-06-23 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 23:28 Thiago Jung Bauermann
2023-06-06 13:49 ` Bruno Larsen
2023-06-22 22:52   ` Thiago Jung Bauermann
2023-06-23 11:36     ` Tom de Vries
2023-06-23 21:09       ` Thiago Jung Bauermann [this message]

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=87bkh5homx.fsf@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=aburgess@redhat.com \
    --cc=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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).