Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/sys Enable the wait3 test in t_wait_noproc_wn...



details:   https://anonhg.NetBSD.org/src/rev/55bd9d9b8ce2
branches:  trunk
changeset: 348777:55bd9d9b8ce2
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Nov 07 02:23:43 2016 +0000

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

diffstat:

 tests/lib/libc/sys/t_wait_noproc.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r 7da245ce6bd1 -r 55bd9d9b8ce2 tests/lib/libc/sys/t_wait_noproc.c
--- a/tests/lib/libc/sys/t_wait_noproc.c        Mon Nov 07 01:55:17 2016 +0000
+++ b/tests/lib/libc/sys/t_wait_noproc.c        Mon Nov 07 02:23:43 2016 +0000
@@ -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_REQUIRE(errno == ECHILD);
 }
 
-#if TWAIT_OPTION == 0
 ATF_TC(wait3);
 ATF_TC_HEAD(wait3, tc)
 {
@@ -104,11 +103,14 @@
 
 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 @@
 #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);
 



Home | Main Index | Thread Index | Old Index