svn commit: r291179 - in stable/10: contrib/netbsd-tests/kernel tests/sys/kern
Garrett Cooper
ngie at FreeBSD.org
Mon Nov 23 08:52:39 UTC 2015
Author: ngie
Date: Mon Nov 23 08:52:38 2015
New Revision: 291179
URL: https://svnweb.freebsd.org/changeset/base/291179
Log:
MFC r290911,r290912:
r290911:
Ignore EINTR from usleep(3) in try_locks(..)
NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds`
is one million or more
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
r290912:
Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite as
tests/sys/kern/lockf_test
Sponsored by: EMC / Isilon Storage Division
Modified:
stable/10/contrib/netbsd-tests/kernel/t_lockf.c
stable/10/tests/sys/kern/Makefile
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/contrib/netbsd-tests/kernel/t_lockf.c
==============================================================================
--- stable/10/contrib/netbsd-tests/kernel/t_lockf.c Mon Nov 23 08:31:41 2015 (r291178)
+++ stable/10/contrib/netbsd-tests/kernel/t_lockf.c Mon Nov 23 08:52:38 2015 (r291179)
@@ -102,6 +102,9 @@ trylocks(int id)
(void)fcntl(fd, F_SETLKW, &fl);
if (usleep(sleeptime) < 0)
+#if defined(__FreeBSD__)
+ if (errno != EINTR)
+#endif
err(1, "usleep");
}
printf("%d: done\n", id);
Modified: stable/10/tests/sys/kern/Makefile
==============================================================================
--- stable/10/tests/sys/kern/Makefile Mon Nov 23 08:31:41 2015 (r291178)
+++ stable/10/tests/sys/kern/Makefile Mon Nov 23 08:52:38 2015 (r291179)
@@ -1,5 +1,9 @@
# $FreeBSD$
+SRCTOP= ${.CURDIR:H:H:H}
+OBJTOP= ${.OBJDIR:H:H:H}
+TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel
+
TESTSDIR= ${TESTSBASE}/sys/kern
ATF_TESTS_C+= kern_descrip_test
@@ -10,9 +14,13 @@ TEST_METADATA.unix_seqpacket_test+= time
LDADD.ptrace_test+= -lpthread
LDADD.unix_seqpacket_test+= -lpthread
+NETBSD_ATF_TESTS_C+= lockf_test
+
WARNS?= 5
TESTS_SUBDIRS+= acct
TESTS_SUBDIRS+= execve
+.include <netbsd-tests.test.mk>
+
.include <bsd.test.mk>
More information about the svn-src-stable-10
mailing list