Properly set alarm value in gdb.threads/non-stop-fair-events.exp
authorYao Qi <yao.qi@linaro.org>
Tue, 7 Apr 2015 10:30:07 +0000 (11:30 +0100)
committerYao Qi <yao.qi@linaro.org>
Tue, 7 Apr 2015 10:30:07 +0000 (11:30 +0100)
commit337532fab150dc531c92a31e179df96b98a619c0
tree0f862fcb81284e5f28106ed7bfdd7d8b421fbd90
parentffa547701bec5b3fb92acf049e5442cbbfc95b2c
Properly set alarm value in gdb.threads/non-stop-fair-events.exp

Nowadays, the alarm value is 60, and alarm is generated on some slow
boards.  This patch is to pass DejaGNU timeout value to the program,
and move the alarm call before going to infinite loop.  If any thread
has activities, the alarm is reset.

gdb/testsuite:

2015-04-07  Yao Qi  <yao.qi@linaro.org>

* gdb.threads/non-stop-fair-events.c (SECONDS): New macro.
(child_function): Call alarm.
(main): Move call to alarm into the loop.
* gdb.threads/non-stop-fair-events.exp: Build program with
-DTIMEOUT=$timeout.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/non-stop-fair-events.c
gdb/testsuite/gdb.threads/non-stop-fair-events.exp