Module Name: src
Committed By: isaki
Date: Thu Feb 5 13:55:37 UTC 2015
Modified Files:
src/tests/lib/libc/sys: t_kevent.c
Log Message:
Skip kqueue_unsupported_fd test if /dev/drvctl is not configured
in the kernel. PR bin/49644.
XXX Ideally, it's better to modify to use more generic device file.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_kevent.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_kevent.c
diff -u src/tests/lib/libc/sys/t_kevent.c:1.6 src/tests/lib/libc/sys/t_kevent.c:1.7
--- src/tests/lib/libc/sys/t_kevent.c:1.6 Thu Nov 29 09:13:44 2012
+++ src/tests/lib/libc/sys/t_kevent.c Thu Feb 5 13:55:37 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: t_kevent.c,v 1.6 2012/11/29 09:13:44 martin Exp $ */
+/* $NetBSD: t_kevent.c,v 1.7 2015/02/05 13:55:37 isaki Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_kevent.c,v 1.6 2012/11/29 09:13:44 martin Exp $");
+__RCSID("$NetBSD: t_kevent.c,v 1.7 2015/02/05 13:55:37 isaki Exp $");
#include <sys/types.h>
#include <sys/event.h>
@@ -153,8 +153,14 @@ ATF_TC_BODY(kqueue_unsupported_fd, tc)
struct kevent ev;
fd = open(DRVCTLDEV, O_RDONLY);
- if (fd == -1 && errno == ENOENT)
- atf_tc_skip("no " DRVCTLDEV " available for testing");
+ if (fd == -1) {
+ switch (errno) {
+ case ENOENT:
+ case ENXIO:
+ atf_tc_skip("no " DRVCTLDEV " available for testing");
+ break;
+ }
+ }
ATF_REQUIRE(fd != -1);
ATF_REQUIRE((kq = kqueue()) != -1);