binutils-gdb/gdb/testsuite/gdb.threads
Pedro Alves d4569d7bc5 Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race
On a target that is both always in non-stop mode and can do displaced
stepping (such as native x86_64 GNU/Linux, with "maint set
target-non-stop on"), the step-over-trips-on-watchpoint.exp test
sometimes fails like this:

   (gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: thread 1
   set scheduler-locking off
   (gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: set scheduler-locking off
   step
  -[Switching to Thread 0x7ffff7fc0700 (LWP 11782)]
  -Hardware watchpoint 4: watch_me
  -
  -Old value = 0
  -New value = 1
  -child_function (arg=0x0) at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c:39
  -39           other = 1; /* set thread-specific breakpoint here */
  -(gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: step
  +wait_threads () at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c:49
  +49       return 1; /* in wait_threads */
  +(gdb) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: step

Note "scheduler-locking" was set off.  The problem is that on such
targets, the step-over of thread 2 and the "step" of thread 1 can be
set to run simultaneously (since with displaced stepping the
breakpoint isn't ever removed from the target), and sometimes, the
"step" of thread 1 finishes first, so it'd take another resume to see
the watchpoint trigger.  Fix this by replacing the wait_threads
function with a one-line infinite loop that doesn't call any function,
so that the "step" of thread 1 never finishes.

gdb/testsuite/ChangeLog:
2015-08-07  Pedro Alves  <palves@redhat.com>

	* gdb.threads/step-over-lands-on-breakpoint.c (wait_threads):
	Delete function.
	(main): Add alarm.  Run an infinite loop instead of calling
	wait_threads.
	* gdb.threads/step-over-lands-on-breakpoint.exp (do_test): Change
	comment.
	* gdb.threads/step-over-trips-on-watchpoint.c (wait_threads):
	Delete function.
	(main): Add alarm.  Run an infinite loop instead of calling
	wait_threads.
	* gdb.threads/step-over-trips-on-watchpoint.exp (do_test): Change
	comment.
2015-08-07 17:26:21 +01:00
..
Makefile.in
attach-into-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
attach-into-signal.exp testsuite: tcl exec& -> 'kill -9 $pid' is racy (attach-many-short-lived-thread.exp races and others) 2015-07-31 20:06:24 +01:00
attach-many-short-lived-threads.c Improve gdb.threads/attach-many-short-lived-threads.exp timeout handling 2015-02-06 13:24:32 +01:00
attach-many-short-lived-threads.exp testsuite: tcl exec& -> 'kill -9 $pid' is racy (attach-many-short-lived-thread.exp races and others) 2015-07-31 20:06:24 +01:00
attach-stopped.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
attach-stopped.exp testsuite: tcl exec& -> 'kill -9 $pid' is racy (attach-many-short-lived-thread.exp races and others) 2015-07-31 20:06:24 +01:00
bp_in_thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
bp_in_thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
break-while-running.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
break-while-running.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
clone-new-thread-event.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
clone-new-thread-event.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
clone-thread_db.c gdb.threads/clone-thread_db.c: Add missing includes and fix pthread_join call 2015-03-04 09:13:49 +00:00
clone-thread_db.exp PR18006: internal error if threaded program calls clone(CLONE_VM) 2015-02-20 19:00:21 +00:00
continue-pending-after-query.c Linux: make target_is_async_p return false when async is off 2015-01-23 11:12:39 +00:00
continue-pending-after-query.exp Linux: make target_is_async_p return false when async is off 2015-01-23 11:12:39 +00:00
continue-pending-status.c native/Linux: internal error if resume is short-circuited 2015-03-19 12:26:49 +00:00
continue-pending-status.exp gdbserver/Linux: unbreak thread event randomization 2015-03-19 12:38:05 +00:00
corethreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
corethreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
create-fail.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
create-fail.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
current-lwp-dead.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
current-lwp-dead.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dlopen-libpthread-lib.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dlopen-libpthread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
dlopen-libpthread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
execl.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
execl.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
execl1.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-child-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-child-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-plus-threads.c PR threads/18600: Threads left stopped after fork+thread spawn 2015-07-30 18:50:29 +01:00
fork-plus-threads.exp remote follow fork and spurious child stops in non-stop mode 2015-07-30 18:52:53 +01:00
fork-thread-pending.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fork-thread-pending.exp Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
forking-threads-plus-breakpoint.c Revert "test slowdown" 2015-08-06 12:45:45 +01:00
forking-threads-plus-breakpoint.exp Revert "test slowdown" 2015-08-06 12:45:45 +01:00
gcore-stale-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gcore-stale-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gcore-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
hand-call-in-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
hand-call-in-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
hand-call-new-thread.c PR threads/18127 - threads spawned by infcall end up stuck in "running" state 2015-06-29 16:07:57 +01:00
hand-call-new-thread.exp PR threads/18127 - threads spawned by infcall end up stuck in "running" state 2015-06-29 16:07:57 +01:00
ia64-sigill.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
ia64-sigill.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
info-threads-cur-sal-2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
info-threads-cur-sal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
info-threads-cur-sal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
interrupted-hand-call.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
interrupted-hand-call.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
kill.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
kill.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
killed.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
killed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
leader-exit.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
leader-exit.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-dp.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
linux-dp.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
local-watch-wrong-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
local-watch-wrong-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
manythreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
manythreads.exp gdb.threads/manythreads.exp: can't read "test": no such variable 2015-04-01 15:30:13 +01:00
multi-create-ns-info-thr.exp gdb.threads/multi-create-ns-info-thr.exp and native-extended-remote board 2015-02-21 12:03:23 +00:00
multi-create.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
multi-create.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
multiple-step-overs.c Add test for PR18214 and PR18216 - multiple step-overs with queued signals 2015-04-08 19:59:03 +01:00
multiple-step-overs.exp gdb/18216: displaced step+deliver signal, a thread needs step-over, crash 2015-04-10 10:36:23 +01:00
next-bp-other-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
next-bp-other-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
next-while-other-thread-longjmps.c stepping is disturbed by setjmp/longjmp | try/catch in other threads 2015-08-05 20:01:42 +01:00
next-while-other-thread-longjmps.exp stepping is disturbed by setjmp/longjmp | try/catch in other threads 2015-08-05 20:01:42 +01:00
no-unwaited-for-left.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
no-unwaited-for-left.exp kfail two tests in no-unwaited-for-left.exp for remote target 2015-04-02 13:51:31 +01:00
non-ldr-exc-1.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-1.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-2.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-2.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-3.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-3.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exc-4.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-4.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
non-ldr-exit.c PR gdb/18717: internal error if non-leader thread exits process 2015-07-24 17:49:17 +01:00
non-ldr-exit.exp PR gdb/18717: internal error if non-leader thread exits process 2015-07-24 17:49:17 +01:00
non-stop-fair-events.c Properly set alarm value in gdb.threads/non-stop-fair-events.exp 2015-04-07 11:30:07 +01:00
non-stop-fair-events.exp Properly set alarm value in gdb.threads/non-stop-fair-events.exp 2015-04-07 11:30:07 +01:00
pending-step.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pending-step.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
print-threads.c
print-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
process-dies-while-handling-bp.c Test for PR18749: problems if whole process dies while (ptrace-) stopped 2015-08-06 12:33:20 +01:00
process-dies-while-handling-bp.exp Test for PR18749: problems if whole process dies while (ptrace-) stopped 2015-08-06 12:33:20 +01:00
pthread_cond_wait.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
pthread_cond_wait.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pthreads.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
pthreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
queue-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
queue-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
reconnect-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
reconnect-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
schedlock.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
schedlock.exp Make "set scheduler-locking step" depend on user intention, only 2015-03-24 17:50:31 +00:00
siginfo-threads.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
siginfo-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-command-handle-nopass.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-command-handle-nopass.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-command-multiple-signals-pending.c Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
signal-command-multiple-signals-pending.exp Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
signal-delivered-right-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-delivered-right-thread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-sigtrap.c Add "signal SIGTRAP" test 2015-02-10 19:30:55 +00:00
signal-sigtrap.exp Add "signal SIGTRAP" test 2015-02-10 19:30:55 +00:00
signal-while-stepping-over-bp-other-thread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signal-while-stepping-over-bp-other-thread.exp Fix signal-while-stepping-over-bp-other-thread.exp on targets always in non-stop 2015-08-07 17:26:20 +01:00
sigstep-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
sigstep-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
sigthread.c
sigthread.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
staticthreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
staticthreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
step-bg-decr-pc-switch-thread.c Fix adjust_pc_after_break, remove still current thread check 2015-02-11 09:45:41 +00:00
step-bg-decr-pc-switch-thread.exp Fix adjust_pc_after_break, remove still current thread check 2015-02-11 09:45:41 +00:00
step-over-lands-on-breakpoint.c Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race 2015-08-07 17:26:21 +01:00
step-over-lands-on-breakpoint.exp Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race 2015-08-07 17:26:21 +01:00
step-over-trips-on-watchpoint.c Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race 2015-08-07 17:26:21 +01:00
step-over-trips-on-watchpoint.exp Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race 2015-08-07 17:26:21 +01:00
stepi-random-signal.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stepi-random-signal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
switch-threads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
switch-threads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-execl.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-execl.exp follow-exec: delete all non-execing threads 2015-03-03 01:25:17 +00:00
thread-find.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific-bp.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific-bp.exp Fix gdb.threads/thread-specific-bp.exp race 2015-03-04 17:23:55 +00:00
thread-specific.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-specific.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread-unwindonsignal.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_check.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_check.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_events.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
thread_events.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threadapply.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threadapply.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threxit-hop-specific.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
threxit-hop-specific.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tid-reuse.c Crash on thread id wrap around 2015-04-01 13:38:06 +01:00
tid-reuse.exp Crash on thread id wrap around 2015-04-01 13:38:06 +01:00
tls-main.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
tls-nodebug.c gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads. 2013-07-18 15:49:22 +00:00
tls-nodebug.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-shared.c gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads. 2013-07-18 15:49:22 +00:00
tls-shared.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-var-main.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-var.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls-var.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls.c
tls.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tls2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-child.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-mt.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
watchpoint-fork-parent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork-st.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchpoint-fork.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads-reorder.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
watchthreads-reorder.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
watchthreads2.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
wp-replication.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
wp-replication.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00