Module Name: src
Committed By: kamil
Date: Sun Nov 6 15:04:14 UTC 2016
Modified Files:
src/tests/lib/libc/sys: Makefile t_wait.c
Log Message:
Add new tests: tests/lib/libc/sys/t_wait_noproc and t_wait_noproc_wnohang
The t_wait_noproc test checks whether wait(2)-family of functions return
error and set ECHILD for lack of childs.
The t_wait_noproc_wnohang adds to options (except wait(2), wait3(2)) new
parameter WNOHANG and verifies that error is still signaled and errno set
to ECHILD.
Currently t_wait_noproc_wnohang reports failures, these have been marked as
expected and referenced to PR standards/51606.
The problem report is authored by Robert Elz, and the initial regression
has been notified by Nicolas Joly.
Remove redundant test in tests/lib/libc/sys/t_wait for wait6(2) with no
WNOHANG specified.
Sponsored by <The NetBSD Foundation>.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_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/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.43 src/tests/lib/libc/sys/Makefile:1.44
--- src/tests/lib/libc/sys/Makefile:1.43 Sat Jul 30 11:03:54 2016
+++ src/tests/lib/libc/sys/Makefile Sun Nov 6 15:04:14 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2016/07/30 11:03:54 njoly Exp $
+# $NetBSD: Makefile,v 1.44 2016/11/06 15:04:14 kamil Exp $
MKMAN= no
@@ -67,6 +67,8 @@ TESTS_C+= t_ucontext
TESTS_C+= t_umask
TESTS_C+= t_unlink
TESTS_C+= t_wait
+TESTS_C+= t_wait_noproc
+TESTS_C+= t_wait_noproc_wnohang
TESTS_C+= t_write
SRCS.t_mprotect= t_mprotect.c ${SRCS_EXEC_PROT}
Index: src/tests/lib/libc/sys/t_wait.c
diff -u src/tests/lib/libc/sys/t_wait.c:1.6 src/tests/lib/libc/sys/t_wait.c:1.7
--- src/tests/lib/libc/sys/t_wait.c:1.6 Sun Nov 6 02:28:57 2016
+++ src/tests/lib/libc/sys/t_wait.c Sun Nov 6 15:04:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_wait.c,v 1.6 2016/11/06 02:28:57 kamil Exp $ */
+/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_wait.c,v 1.6 2016/11/06 02:28:57 kamil Exp $");
+__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $");
#include <sys/wait.h>
#include <sys/resource.h>
@@ -60,22 +60,6 @@ ATF_TC_BODY(wait6_invalid, tc)
&& errno == EINVAL);
}
-ATF_TC(wait6_noproc);
-ATF_TC_HEAD(wait6_noproc, tc)
-{
- atf_tc_set_md_var(tc, "descr",
- "Test that wait6(2) returns ECHILD with for no processes");
-}
-
-ATF_TC_BODY(wait6_noproc, tc)
-{
- siginfo_t si;
- struct wrusage wru;
- int st;
- ATF_REQUIRE(wait6(P_ALL, 0, &st, WEXITED, &wru, &si) == -1
- && errno == ECHILD);
-}
-
ATF_TC(wait6_exited);
ATF_TC_HEAD(wait6_exited, tc)
{
@@ -311,7 +295,6 @@ ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, wait6_invalid);
- ATF_TP_ADD_TC(tp, wait6_noproc);
ATF_TP_ADD_TC(tp, wait6_exited);
ATF_TP_ADD_TC(tp, wait6_terminated);
ATF_TP_ADD_TC(tp, wait6_coredumped);