diff mbox

Avoid deadlock in guality tests.

Message ID CAD57uCe+dJODe7S8EgaZimMs+JCBGK1HfBqWgBnx-hZFJVw-1A@mail.gmail.com
State New
Headers show

Commit Message

Yvan Roux April 7, 2016, 1:41 p.m. UTC
Hi,

On 6 April 2016 at 17:29, Yvan Roux <yvan.roux@linaro.org> wrote:
> On 6 April 2016 at 17:24, Pedro Alves <palves@redhat.com> wrote:

>> On 04/06/2016 04:13 PM, Yvan Roux wrote:

>>> On 6 April 2016 at 17:09, Pedro Alves <palves@redhat.com> wrote:

>>>> On 04/06/2016 03:53 PM, Yvan Roux wrote:

>>>>> Dejagnu cleanup mechanism needs to be enhanced, but I think that it

>>>>> would also be better if guality tests don't get stuck and/or can be

>>>>> killed easily.  This patch changes GDB signals handling to nostop for

>>>>> SIGSEGV, SIGINT, SIGTERM and SIGBUS.  I am not sure if we need to

>>>>> increase the list of signals to all the stop ones (which are not used

>>>>> by GDB) or to restrict it just to SIGSEGV.

>>>>

>>>> I'd suggest:

>>>>

>>>>  handle all pass nostop

>>>>  handle SIGINT pass nostop

>>>>

>>>> That would make gdb pass _all_ signals except SIGTRAP

>>>

>>> I've committed it already :/

>>>

>>> I can make the change, but isn't there cases where SIGILL is used for

>>> breakpoints in GDB (I think I've seen that somewhere).

>>

>> True, and SIGSEGV and SIGEMT too.  But GDB handles that transparently

>> and won't pass such a breakpoint signal to the program, even with

>> "handle pass".  Only "handle SIGTRAP pass" passes a

>> breakpoint/step/etc. trap to the program.

>

> Ah ok, thanks for the explanations Pedro, I'll prepare a new patch and

> validate it.


Here is the new patch which makes GDB pass all signals except SIGTRAP.
validated on native armv8l target without regessions. ok for trunk ?

Cheers,
Yvan

2016-04-07  Yvan Roux  <yvan.roux@linaro.org>
            Pedro Alves  <palves@redhat.com>

        * gcc.dg/guality/guality.h (main): Make GDB pass all signals except
        SIGTRAP.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h
index d5867d8..acf977f 100644
--- a/gcc/testsuite/gcc.dg/guality/guality.h
+++ b/gcc/testsuite/gcc.dg/guality/guality.h
@@ -252,10 +252,8 @@  main (int argc, char *argv[])
       if (!guality_gdb_input
 	  || fprintf (guality_gdb_input, "\
 set height 0\n\
+handle all pass nostop\n\
 handle SIGINT pass nostop\n\
-handle SIGTERM pass nostop\n\
-handle SIGSEGV pass nostop\n\
-handle SIGBUS pass nostop\n\
 attach %i\n\
 set guality_attached = 1\n\
 b %i\n\