Module Name:    src
Committed By:   kamil
Date:           Wed Mar  7 16:40:06 UTC 2018

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

Log Message:
ATF: Reenable attach2 in t_ptrace_wait*

The primary race specific to this test has been fixed in previous commit
(wrong WNOHANG).

This test is still racy and breaks like once every 30,000 execution.
This is down like from once from every 100th execution in the past.

The remaning race is not specific to attach2 and I can reproduce it with
at least attach1. It still looks like being specific to NetBSD and it's
not reproducible on Linux and FreeBSD. Perhaps a bug with pipe(2)/write(2)/
read(2) or close to these features.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 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.24 src/tests/lib/libc/sys/t_ptrace_wait.c:1.25
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.24	Wed Mar  7 10:53:55 2018
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Wed Mar  7 16:40:06 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.24 2018/03/07 10:53:55 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.25 2018/03/07 16:40:06 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.24 2018/03/07 10:53:55 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.25 2018/03/07 16:40:06 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -424,9 +424,6 @@ ATF_TC_BODY(attach2, tc)
 	int status;
 #endif
 
-	// Feature pending for refactoring
-	atf_tc_expect_fail("test is racy");
-
 	DPRINTF("Spawn tracee\n");
 	SYSCALL_REQUIRE(msg_open(&parent_tracee) == 0);
 	tracee = atf_utils_fork();
@@ -507,9 +504,6 @@ ATF_TC_BODY(attach2, tc)
 
 	msg_close(&parent_tracer);
 	msg_close(&parent_tracee);
-
-	// Test is racy
-	ATF_REQUIRE(0 && "In order to get reliable failure, abort");
 }
 #endif
 

Reply via email to