NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/49644: tests/lib/libc/sys/t_kevent failed on many arch
>Number: 49644
>Category: bin
>Synopsis: tests/lib/libc/sys/t_kevent failed on many arch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 05 13:25:00 +0000 2015
>Originator: Tetsuya Isaki
>Release: NetBSD-current (2015/02/03)
>Organization:
>Environment:
NetBSD x68k.local 7.99.4 NetBSD 7.99.4 (GENERIC) #0: Thu Feb 5 15:13:36 JST 2015 isaki@XXXXXXXX:/var/obj/current/x68k/obj/sys/arch/x68k/compile/GENERIC x68k
>Description:
tests/lib/libc/sys/t_kevent:kqueue_unsupported_fd failed
abnormally if the kernel does not have 'pseudo-device drvctl'.
Here is the log of atf-report (on x68k):
| lib/libc/sys/t_kevent (217/592): 3 test cases
| kevent_zerotimer: [0.841000s] Passed.
| kqueue_desc_passing: [1.074400s] Skipped: PR kern/46523
| kqueue_unsupported_fd: [0.937650s] Failed: /autobuild/7/src/tests/lib/libc/sys/t_kevent.c:158: fd != -1 not met
kqueue_unsupported_fd test will try to open /dev/drvctl, but
/dev/drvctl is only prepared to GENERIC with the following
architectures. So in these architectures, the kqueue_unsupported_fd
test is "not executed", not "executed and failed."
% cd /usr/src/sys/arch
% grep -r drvctl */conf/GENERIC | grep -v #
amd64/conf/GENERIC:pseudo-device drvctl
hppa/conf/GENERIC:pseudo-device drvctl
i386/conf/GENERIC:pseudo-device drvctl
macppc/conf/GENERIC:pseudo-device drvctl
ofppc/conf/GENERIC:pseudo-device drvctl
sandpoint/conf/GENERIC:pseudo-device drvctl
sparc64/conf/GENERIC:pseudo-device drvctl
>How-To-Repeat:
Remove 'pseudo-device drvctl' from your kernel config,
and boot with the kernel.
# cd /usr/tests/lib/libc/gen
# atf-report t_kevent | atf-report
>Fix:
(although I don't know whether it's possible to replace from
/dev/drvctl to other devices.. ,)
if the test really needs /dev/drvctl, How about this patch?
Opening /dev/drvctl returns ENXIO(device not configured) when
it is not present in the kernel and it skips this test normally.
Index: tests/lib/libc/sys/t_kevent.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/t_kevent.c,v
retrieving revision 1.6
diff -u -r1.6 t_kevent.c
--- tests/lib/libc/sys/t_kevent.c 29 Nov 2012 09:13:44 -0000 1.6
+++ tests/lib/libc/sys/t_kevent.c 5 Feb 2015 12:45:27 -0000
@@ -153,8 +153,14 @@
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);
It is only changing the state of the test from "not executed" to
"skip normally."
Or please revise the test to not use /dev/drvctl...
Home |
Main Index |
Thread Index |
Old Index