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 adapt to new reality



details:   https://anonhg.NetBSD.org/src/rev/ff5bebe076d6
branches:  trunk
changeset: 779547:ff5bebe076d6
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jun 02 16:52:18 2012 +0000

description:
adapt to new reality

diffstat:

 tests/lib/libc/sys/t_kevent.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 15c4c1e5f0b4 -r ff5bebe076d6 tests/lib/libc/sys/t_kevent.c
--- a/tests/lib/libc/sys/t_kevent.c     Sat Jun 02 16:52:11 2012 +0000
+++ b/tests/lib/libc/sys/t_kevent.c     Sat Jun 02 16:52:18 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_kevent.c,v 1.3 2012/05/31 20:31:07 martin Exp $ */
+/*     $NetBSD: t_kevent.c,v 1.4 2012/06/02 16:52:18 martin Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,12 +29,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_kevent.c,v 1.3 2012/05/31 20:31:07 martin Exp $");
+__RCSID("$NetBSD: t_kevent.c,v 1.4 2012/06/02 16:52:18 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/event.h>
 
 #include <atf-c.h>
+#include <errno.h>
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -82,7 +83,7 @@
 
        ATF_REQUIRE((kq = kqueue()) != -1);
 
-       atf_tc_skip("crashes kernel (PR 46463)");
+       // atf_tc_skip("crashes kernel (PR 46463)");
 
        ATF_REQUIRE(socketpair(AF_LOCAL, SOCK_STREAM, 0, s) != -1);
        msg = malloc(CMSG_SPACE(sizeof(int)));
@@ -125,7 +126,10 @@
        ATF_CHECK(kevent(kq, &ev, 1, NULL, 0, NULL) != -1);
 
        printf("parent (pid %d): sending kq fd %d\n", getpid(), kq);
-       ATF_REQUIRE(sendmsg(s[0], &m, 0) != -1);
+       if (sendmsg(s[0], &m, 0) == -1) {
+               ATF_REQUIRE_EQ_MSG(errno, EBADF, "errno is %d", errno);
+               atf_tc_skip("PR kern/46523");
+       }
 
        close(kq);
 



Home | Main Index | Thread Index | Old Index