non-stop-fair-events.exp slower on software single-step && !displ-step targets
authorPedro Alves <palves@redhat.com>
Wed, 16 Sep 2015 14:51:36 +0000 (15:51 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 16 Sep 2015 14:51:36 +0000 (15:51 +0100)
commit1ed415e2b9b985aac087c35949d0e1e489ab496d
treedf038515e3a63a190bebeb97177e1a1af0e21b77
parentd136eff549649f23b12121575362dfa09343ea0a
non-stop-fair-events.exp slower on software single-step && !displ-step targets

On software single-step targets that don't support displaced stepping,
threads keep hitting each other's single-step breakpoints, and then
GDB needs to pause all threads to step past those.  The end result is
that progress in the main thread will be slower and it may take a bit
longer for the signal to be queued.  This patch bumps the timeout on
such targets.

gdb/testsuite/ChangeLog:
2015-09-16  Pedro Alves  <palves@redhat.com>
    Sandra Loosemore <sandra@codesourcery.com>

* gdb.threads/non-stop-fair-events.c (timeout): New global.
(SECONDS): Redefine.
(main): Call pthread_kill and alarm early.
* gdb.threads/non-stop-fair-events.exp: Probe displaced stepping
support.
(test): If the target can't hardware step and doesn't support
displaced stepping, increase the timeout.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/non-stop-fair-events.c
gdb/testsuite/gdb.threads/non-stop-fair-events.exp
gdb/testsuite/lib/gdb.exp