diff options
| author | martin <martin@NetBSD.org> | 2019-10-15 18:34:34 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2019-10-15 18:34:34 +0000 |
| commit | 20983d3122e8c28e630796ca98bf8b400e6c028e (patch) | |
| tree | 09c96a3be70e2cdcb242262b51d3fe0e2945dbbf /tests | |
| parent | 57510aea6651dc9e1354bc1cec37a99edeca1ae0 (diff) | |
Pull up following revision(s) (requested by kamil in ticket #312):
tests/lib/libc/sys/t_ptrace_wait.c: revision 1.135
Bump the number of threads in LWP t_ptrace_wait*() tests from to 100
This is a torture, but on purpose to catch LWP_CREATED and LWP_EXITED bugs.
The threads do nothing other than calling sched_yield() in a loop.
MAXLWP is now defined to 2048 on all ports.
This change effects the following tests:
- trace_thread_nolwpevents
- trace_thread_lwpexit
- trace_thread_lwpcreate
- trace_thread_lwpcreate_and_exit
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lib/libc/sys/t_ptrace_wait.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/libc/sys/t_ptrace_wait.c b/tests/lib/libc/sys/t_ptrace_wait.c index 7f221453242..f222800e086 100644 --- a/tests/lib/libc/sys/t_ptrace_wait.c +++ b/tests/lib/libc/sys/t_ptrace_wait.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.131.2.1 2019/10/15 18:22:55 martin Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.131.2.2 2019/10/15 18:34:34 martin Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.131.2.1 2019/10/15 18:22:55 martin Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.131.2.2 2019/10/15 18:34:34 martin Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -5429,6 +5429,8 @@ TRACEME_EXEC(traceme_signalignored_exec, false, true) /// ---------------------------------------------------------------------------- +#define TRACE_THREADS_NUM 100 + static volatile int done; static void * @@ -5437,8 +5439,8 @@ trace_threads_cb(void *arg __unused) done++; - while (done < 3) - continue; + while (done < TRACE_THREADS_NUM) + sched_yield(); return NULL; } @@ -5457,7 +5459,7 @@ trace_threads(bool trace_create, bool trace_exit) const int elen = sizeof(event); struct ptrace_siginfo info; - pthread_t t[3]; + pthread_t t[TRACE_THREADS_NUM]; int rv; size_t n; lwpid_t lid; |
