old-cross-binutils/gdb/testsuite/gdb.threads
Pedro Alves 2278c276a8 gdb.threads/manythreads.exp: clean up and add comment
In git b57bacec, I said:

> With that in place, the need to delay "Program received signal FOO"
> was actually caught by the manythreads.exp test.  Without that bit, I
> was getting:
>
>   [Thread 0x7ffff7f13700 (LWP 4499) exited]
>   [New Thread 0x7ffff7f0b700 (LWP 4500)]
>   ^C
>   Program received signal SIGINT, Interrupt.
>   [New Thread 0x7ffff7f03700 (LWP 4501)]           <<< new output
>   [Switching to Thread 0x7ffff7f0b700 (LWP 4500)]
>   __GI___nptl_death_event () at events.c:31
>   31      {
>   (gdb) FAIL: gdb.threads/manythreads.exp: stop threads 1
>
> That is, I was now getting "New Thread" lines after the "Program
> received signal" line, and the test doesn't expect them.  As the
> number of new threads discovered before and after the "Program
> received signal" output is unbounded, it's much nicer to defer
> "Program received signal" until after synching the thread list, thus
> close to the "switching to thread" output and "current frame/source"
> info:
>
>   [Thread 0x7ffff7863700 (LWP 7647) exited]
>   ^C[New Thread 0x7ffff786b700 (LWP 7648)]
>
>   Program received signal SIGINT, Interrupt.
>   [Switching to Thread 0x7ffff7fc4740 (LWP 6243)]
>   __GI___nptl_create_event () at events.c:25
>   25      {
>   (gdb) PASS: gdb.threads/manythreads.exp: stop threads 1

This commit factors out the two places in the test that are effected
by this, and adds there a destilled version of the comment above.

gdb/testsuite/
2014-10-02  Pedro Alves  <palves@redhat.com>

	* gdb.threads/manythreads.exp (interrupt_and_wait): New procedure.
	(top level) <stop threads 1, stop threads 2>: Use it.
2014-10-02 10:13:56 +01:00
..
attach-into-signal.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
attach-into-signal.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
attach-stopped.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
attach-stopped.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
bp_in_thread.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
bp_in_thread.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
break-while-running.c Fix "breakpoint always-inserted off"; remove "breakpoint always-inserted auto" 2014-09-22 10:07:04 +01:00
break-while-running.exp Fix non-stop regressions caused by "breakpoints always-inserted off" changes 2014-10-02 10:08:00 +01:00
clone-new-thread-event.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
clone-new-thread-event.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
corethreads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
corethreads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
create-fail.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
create-fail.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
current-lwp-dead.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
current-lwp-dead.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dlopen-libpthread-lib.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dlopen-libpthread.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dlopen-libpthread.exp Skip dlopen-libpthread.exp in cross testing 2014-09-30 11:42:51 +08:00
execl.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
execl.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
execl1.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
fork-child-threads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
fork-child-threads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
fork-thread-pending.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
fork-thread-pending.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gcore-stale-thread.c Fix 'gcore' with exited threads 2014-08-21 20:36:20 +02:00
gcore-stale-thread.exp Fix 'gcore' with exited threads 2014-08-21 20:36:20 +02:00
gcore-thread.exp Remove useless gcore command detection 2014-08-21 11:36:59 +01:00
hand-call-in-threads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
hand-call-in-threads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
ia64-sigill.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
ia64-sigill.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
info-threads-cur-sal-2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
info-threads-cur-sal.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
info-threads-cur-sal.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
interrupted-hand-call.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
interrupted-hand-call.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
kill.c GDBserver crashes when killing a multi-thread process 2014-07-11 11:07:13 +01:00
kill.exp GDBserver crashes when killing a multi-thread process 2014-07-11 11:07:13 +01:00
killed.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
killed.exp after gdb_run_cmd, gdb_expect -> gdb_test_multiple/gdb_test 2014-09-12 22:16:31 +01:00
leader-exit.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
leader-exit.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
linux-dp.c
linux-dp.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
local-watch-wrong-thread.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
local-watch-wrong-thread.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Makefile.in
manythreads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
manythreads.exp gdb.threads/manythreads.exp: clean up and add comment 2014-10-02 10:13:56 +01:00
multi-create.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
multi-create.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
multiple-step-overs.c Handle multiple step-overs. 2014-03-20 13:43:28 +00:00
multiple-step-overs.exp Handle multiple step-overs. 2014-03-20 13:43:28 +00:00
no-unwaited-for-left.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
no-unwaited-for-left.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-1.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-1.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-2.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-3.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-3.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-4.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-ldr-exc-4.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pending-step.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pending-step.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
print-threads.c
print-threads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pthread_cond_wait.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pthread_cond_wait.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pthreads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pthreads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
queue-signal.c Fix set up of queue-signal.exp test. 2014-09-14 10:48:38 -07:00
queue-signal.exp New command queue-signal. 2014-09-13 21:44:00 -07:00
reconnect-signal.c [remote/gdbserver] Don't lose signals when reconnecting. 2014-01-08 18:55:51 +00:00
reconnect-signal.exp [remote/gdbserver] Don't lose signals when reconnecting. 2014-01-08 18:55:51 +00:00
schedlock.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
schedlock.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
siginfo-threads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
siginfo-threads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
signal-command-handle-nopass.c Always pass signals to the right thread 2014-07-25 16:57:31 +01:00
signal-command-handle-nopass.exp gdb.threads/signal-command-handle-nopass.exp: Add comment 2014-07-30 12:19:30 +01:00
signal-command-multiple-signals-pending.c Always pass signals to the right thread 2014-07-25 16:57:31 +01:00
signal-command-multiple-signals-pending.exp Always pass signals to the right thread 2014-07-25 16:57:31 +01:00
signal-delivered-right-thread.c Always pass signals to the right thread 2014-07-25 16:57:31 +01:00
signal-delivered-right-thread.exp Always pass signals to the right thread 2014-07-25 16:57:31 +01:00
signal-while-stepping-over-bp-other-thread.c Further cleanup of signal-while-stepping-over-bp-other-thread.c. 2014-03-20 14:09:53 +00:00
signal-while-stepping-over-bp-other-thread.exp Make signal-while-stepping-over-bp-other-thread.exp run against remote targets too. 2014-03-20 13:44:32 +00:00
sigstep-threads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sigstep-threads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
sigthread.c
sigthread.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
staticthreads.c Fix the race in gdb.threads/staticthreads.exp 2014-06-06 09:45:22 +08:00
staticthreads.exp Fix the race in gdb.threads/staticthreads.exp 2014-06-06 09:45:22 +08:00
step-over-lands-on-breakpoint.c Fix missing breakpoint/watchpoint hits, eliminate deferred_step_ptid. 2014-03-20 13:26:31 +00:00
step-over-lands-on-breakpoint.exp Fix missing breakpoint/watchpoint hits, eliminate deferred_step_ptid. 2014-03-20 13:26:31 +00:00
step-over-trips-on-watchpoint.c Fix for even more missed events; eliminate thread-hop code. 2014-03-20 13:42:23 +00:00
step-over-trips-on-watchpoint.exp Fix for even more missed events; eliminate thread-hop code. 2014-03-20 13:42:23 +00:00
stepi-random-signal.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
stepi-random-signal.exp Fix gdb.threads/stepi-random-signal.exp on software single-step targets. 2014-02-07 19:04:10 +00:00
switch-threads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
switch-threads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread-execl.c gdb.threads/thread-execl.exp: #include <stdio.h>. 2014-08-25 12:23:50 -07:00
thread-execl.exp Fix next over threaded execl with "set scheduler-locking step". 2014-06-19 11:59:03 +01:00
thread-find.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread-specific-bp.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread-specific-bp.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
thread-specific.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread-specific.exp gdb.threads/thread-specific.exp: Fix uninitialized variable references 2014-03-21 23:51:16 +00:00
thread-unwindonsignal.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread_check.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread_check.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread_events.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
thread_events.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
threadapply.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
threadapply.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
threxit-hop-specific.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
threxit-hop-specific.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls-main.c
tls-nodebug.c
tls-nodebug.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls-shared.c
tls-shared.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls-var-main.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls-var.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls-var.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls.c
tls.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
tls2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchpoint-fork-child.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchpoint-fork-mt.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchpoint-fork-parent.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchpoint-fork-st.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchpoint-fork.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchpoint-fork.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchthreads-reorder.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchthreads-reorder.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchthreads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchthreads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchthreads2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
watchthreads2.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
wp-replication.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
wp-replication.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00