Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/tests/lib/libc/sys Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/9507d0550be7
branches:  netbsd-9
changeset: 455371:9507d0550be7
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Oct 15 18:34:34 2019 +0000

description:
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:

 tests/lib/libc/sys/t_ptrace_wait.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r abb5c25c8976 -r 9507d0550be7 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Tue Oct 15 18:32:13 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Tue Oct 15 18:34:34 2019 +0000
@@ -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 @@
 
 /// ----------------------------------------------------------------------------
 
+#define TRACE_THREADS_NUM 100
+
 static volatile int done;
 
 static void *
@@ -5437,8 +5439,8 @@
 
        done++;
 
-       while (done < 3)
-               continue;
+       while (done < TRACE_THREADS_NUM)
+               sched_yield();
 
        return NULL;
 }
@@ -5457,7 +5459,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