svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time
Garrett Cooper
ngie at FreeBSD.org
Mon Oct 13 02:44:36 UTC 2014
Author: ngie
Date: Mon Oct 13 02:44:35 2014
New Revision: 273024
URL: https://svnweb.freebsd.org/changeset/base/273024
Log:
Only test the return value in mktime_negyear
Testing for the errno is an optional requirement according to POSIX, and
FreeBSD doesn't document that errno would be set on failure with mktime
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
Modified:
head/contrib/netbsd-tests/lib/libc/time/t_mktime.c
Modified: head/contrib/netbsd-tests/lib/libc/time/t_mktime.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/time/t_mktime.c Mon Oct 13 02:32:37 2014 (r273023)
+++ head/contrib/netbsd-tests/lib/libc/time/t_mktime.c Mon Oct 13 02:44:35 2014 (r273024)
@@ -72,7 +72,12 @@ ATF_TC_BODY(mktime_negyear, tc)
errno = 0;
t = mktime(&tms);
+#if defined(__FreeBSD__)
+ /* Open Group says "and may set errno to indicate the error" */
+ ATF_REQUIRE(t == (time_t)-1);
+#else
ATF_REQUIRE_ERRNO(0, t != (time_t)-1);
+#endif
}
ATF_TC(timegm_epoch);
More information about the svn-src-head
mailing list