Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Don't run forever in gdb.base/structs.c
Date: Fri, 03 Oct 2014 08:57:00 -0000	[thread overview]
Message-ID: <542E650E.4090609@redhat.com> (raw)
In-Reply-To: <CADPb22RA+nn55F=BCof+deCh5LRQZ3z58RUESGD2UptAwfLYqQ@mail.gmail.com>

On 10/02/2014 09:10 PM, Doug Evans wrote:
> On Wed, Oct 1, 2014 at 4:51 PM, Pedro Alves <palves@redhat.com> wrote:
>> On 10/01/2014 10:02 PM, Doug Evans wrote:
>>
>>> If gdb crashes during testing tests may be left to free-run, eating cpu.
>>>
>>> This patch fixes one of the more egregious cases since several versions
>>> of the program are built.
>>>
>>> I've got patches to fix others.
>>> Just seeing if folks want to comment on this first.
>>>
>>> IWBN to have the harness itself cleanup, and I think there's something
>>> we can do there, but that's not always robust either, and I think
>>> multiple levels of robustness would be useful.
>>
>> Agreed.
>>
>>> Since this testcase is an egregious one, and since this patch simple,
>>> I'm starting with this.
>>
>> Looks fine with me.
> 
> Committed, thanks.

Thank you.  Guess this could be material for:

 https://sourceware.org/gdb/wiki/GDBTestcaseCookbook

?

>> In a few other tests, we use "alarm()", though IMO it's best to avoid
>> that if possible, to expose the test on as much targets as possible.
>> E.g., alarm() IIRC isn't available on mingw unless you
>> specify __USE_MINGW_ALARM.  Bare metal targets may have trouble
>> with it too, etc.
> 
> Agreed.

Expanding on that a bit: TBC, I see no problem with alarm() if the
test is already using other posix-ish things, like pthread_create,
or signal.  I'd avoid iff the test otherwise could be mostly
plain C/C++ and OS independent, like structs.c.

Thanks,
Pedro Alves


  reply	other threads:[~2014-10-03  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 21:02 Doug Evans
2014-10-01 23:51 ` Pedro Alves
2014-10-02 20:10   ` Doug Evans
2014-10-03  8:57     ` Pedro Alves [this message]
2014-10-27 19:32       ` Doug Evans

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=542E650E.4090609@redhat.com \
    --to=palves@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.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