Module Name:    src
Committed By:   kamil
Date:           Tue Jun 18 21:14:26 UTC 2019

Modified Files:
        src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Allow to conditionally enable LWP ATF tests in t_ptrace_wait*

By default the tests are disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/tests/lib/libc/sys/t_ptrace_wait.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.127 src/tests/lib/libc/sys/t_ptrace_wait.c:1.128
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.127	Thu Jun 13 20:26:06 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Tue Jun 18 21:14:26 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.127 2019/06/13 20:26:06 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.128 2019/06/18 21:14:26 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.127 2019/06/13 20:26:06 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.128 2019/06/18 21:14:26 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -103,6 +103,10 @@ static int debug = 0;
 #define TEST_VFORK_ENABLED 1
 #endif
 
+#ifndef TEST_LWP_ENABLED
+#define TEST_LWP_ENABLED 0
+#endif
+
 /// ----------------------------------------------------------------------------
 
 static void
@@ -5454,8 +5458,10 @@ trace_threads(bool trace_create, bool tr
 	/* Track created and exited threads */
 	bool traced_lwps[__arraycount(t)];
 
+#if !TEST_LWP_ENABLED
 	if (trace_create || trace_exit)
 		atf_tc_skip("PR kern/51995");
+#endif
 
 	DPRINTF("Before forking process PID=%d\n", getpid());
 	SYSCALL_REQUIRE((child = fork()) != -1);

Reply via email to