svn commit: r297637 - head/contrib/netbsd-tests/lib/libc/sys
Garrett Cooper
ngie at FreeBSD.org
Thu Apr 7 06:21:34 UTC 2016
Author: ngie
Date: Thu Apr 7 06:21:33 2016
New Revision: 297637
URL: https://svnweb.freebsd.org/changeset/base/297637
Log:
Disable the NetBSD-specific EFAULT requirements test in gettimeofday_err
FreeBSD doesn't specifically list this as a supported error, and in some
configurations/versions of FreeBSD, this test will segfault as the memory
address might be evaluated in userspace, instead of in kernel space like
in NetBSD.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Modified:
head/contrib/netbsd-tests/lib/libc/sys/t_gettimeofday.c
Modified: head/contrib/netbsd-tests/lib/libc/sys/t_gettimeofday.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_gettimeofday.c Thu Apr 7 05:56:22 2016 (r297636)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_gettimeofday.c Thu Apr 7 06:21:33 2016 (r297637)
@@ -46,9 +46,11 @@ ATF_TC_HEAD(gettimeofday_err, tc)
ATF_TC_BODY(gettimeofday_err, tc)
{
+#ifdef __NetBSD__
errno = 0;
ATF_REQUIRE_ERRNO(EFAULT, gettimeofday((void *)-1, NULL) != 0);
+#endif
}
ATF_TC(gettimeofday_mono);
More information about the svn-src-head
mailing list