Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys Bump the number of threads in LWP t_ptrac...
details: https://anonhg.NetBSD.org/src/rev/50875970f6e2
branches: trunk
changeset: 966071:50875970f6e2
user: kamil <kamil%NetBSD.org@localhost>
date: Sun Oct 13 04:00:12 2019 +0000
description:
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:
tests/lib/libc/sys/t_ptrace_wait.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r b0164f0c5c65 -r 50875970f6e2 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c Sun Oct 13 03:50:26 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c Sun Oct 13 04:00:12 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.134 2019/10/02 23:15:09 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.135 2019/10/13 04:00:12 kamil 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.134 2019/10/02 23:15:09 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.135 2019/10/13 04:00:12 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -5455,6 +5455,8 @@
/// ----------------------------------------------------------------------------
+#define TRACE_THREADS_NUM 100
+
static volatile int done;
static void *
@@ -5463,8 +5465,8 @@
done++;
- while (done < 3)
- continue;
+ while (done < TRACE_THREADS_NUM)
+ sched_yield();
return NULL;
}
@@ -5483,7 +5485,7 @@
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;
Home |
Main Index |
Thread Index |
Old Index