Module Name: src Committed By: kamil Date: Mon Nov 7 02:23:43 UTC 2016
Modified Files: src/tests/lib/libc/sys: t_wait_noproc.c Log Message: Enable the wait3 test in t_wait_noproc_wnohang (through t_wait_noproc) This test has set expected failure like other functions in the wait(2) family and is linked with PR standards/51606. The PR is labeled as: wait4() (and friends) with WNOHANG and no children does not error Originally, this test was accidently disabled in the WNOHANG checks. This was noted by Robert Elz. Sponsored by <The NetBSD Foundation>. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_wait_noproc.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_wait_noproc.c diff -u src/tests/lib/libc/sys/t_wait_noproc.c:1.1 src/tests/lib/libc/sys/t_wait_noproc.c:1.2 --- src/tests/lib/libc/sys/t_wait_noproc.c:1.1 Sun Nov 6 15:03:30 2016 +++ src/tests/lib/libc/sys/t_wait_noproc.c Mon Nov 7 02:23:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_wait_noproc.c,v 1.1 2016/11/06 15:03:30 kamil Exp $ */ +/* $NetBSD: t_wait_noproc.c,v 1.2 2016/11/07 02:23:43 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_wait_noproc.c,v 1.1 2016/11/06 15:03:30 kamil Exp $"); +__RCSID("$NetBSD: t_wait_noproc.c,v 1.2 2016/11/07 02:23:43 kamil Exp $"); #include <sys/wait.h> #include <sys/resource.h> @@ -94,7 +94,6 @@ ATF_TC_BODY(waitid, tc) ATF_REQUIRE(errno == ECHILD); } -#if TWAIT_OPTION == 0 ATF_TC(wait3); ATF_TC_HEAD(wait3, tc) { @@ -104,11 +103,14 @@ ATF_TC_HEAD(wait3, tc) ATF_TC_BODY(wait3, tc) { +#if TWAIT_OPTION + /* wait4() (and friends) with WNOHANG and no children does not error */ + atf_tc_expect_fail("PR standards/51606"); +#endif errno = 0; - ATF_REQUIRE(wait3(NULL, 0, NULL) == -1); + ATF_REQUIRE(wait3(NULL, TWAIT_OPTION, NULL) == -1); ATF_REQUIRE(errno == ECHILD); } -#endif ATF_TC(wait4); ATF_TC_HEAD(wait4, tc) @@ -156,9 +158,7 @@ ATF_TP_ADD_TCS(tp) #endif ATF_TP_ADD_TC(tp, waitpid); ATF_TP_ADD_TC(tp, waitid); -#if TWAIT_OPTION == 0 ATF_TP_ADD_TC(tp, wait3); -#endif ATF_TP_ADD_TC(tp, wait4); ATF_TP_ADD_TC(tp, wait6);