History log of /src/tests/lib/libc/time |
Revision | Date | Author | Comments |
1.1 | 13-Jan-2011 |
pgoyette | Move t_mktime and t_strptime to their own ..../time/ subdirectory.
(Concurrence from christos@)
|
1.6 | 27-Oct-2017 |
kre | Remove bogus errno checks, mktime() (and timegm()) does not guarantee to leave errno unaltered if there is no error. And does not.
While here, write -1 the same way everyone else does (not ~0, which would not even be negative on a 1's complement host, if you can find one).
And while not needed for the test, but so that if checked, the result is more likely to be what is anticipated, set tm_mday to an in-range value in the mtime_negyear test (otherwise the correction results in the result movng backwards to the last day of the previous month, which is the end of Decemper, 1898, rather than the 1899 one would expect from year -1.)
|
1.5 | 18-Mar-2012 |
jruoho | Add a test case for the old NetBSD 2.0 era PR lib/28324.
|
1.4 | 07-Jan-2012 |
martin | ATF_REQUIRE_ERRNO() needs to be used with care: - pass the expected errno to it, not "errno" - make sure to have errno set already before invoking the macro, i.e. do not use it to test errno changes as side effect of the asserted expression
Spotted by mlelstv, makes the epoch tests correctly fail on amd64 as well.
|
1.3 | 17-Dec-2011 |
apb | Add some tests for timegm(3) close to the epoch. In particular, 1969-12-31 23:59:59 should convert to (time_t)-1 with errno = 0.
|
1.2 | 07-Apr-2011 |
jruoho | branches: 1.2.4; Remove the following (literal) text in the TNF copyrights:
* This code is derived from software contributed to The NetBSD Foundation * by *
XXX: If these originated from you and you want your name to be mentioned, please add it.
|
1.1 | 13-Jan-2011 |
pgoyette | Move t_mktime and t_strptime to their own ..../time/ subdirectory.
(Concurrence from christos@)
|
1.2.4.1 | 17-Apr-2012 |
yamt | sync with head
|
1.17 | 26-Mar-2024 |
rillig | t_strptime: fix typo in test description
|
1.16 | 16-Mar-2024 |
riastradh | strptime(3): Exercise some edge cases in the automatic tests.
Unfortunately, we can't quite use strptime as a black box to detect the cases that triggered undefined behaviour, because strptime just fails in that case anyway since the number that would go in .tm_year is far out of the representable range.
PR lib/58041
|
1.15 | 03-Jun-2018 |
maya | branches: 1.15.4; 1.15.12; use ATF_CHECK instead of ATF_REQUIRE (continue on failure, to see the rest of the failures)
From Ngie Cooper in PR bin/51834
|
1.14 | 27-Oct-2017 |
kre | branches: 1.14.2;
The Zone test was obviously intended to test %Z rather than %z, otherwise it would be (and has been) identical to the zone test, which would be a pointless waste of time.
|
1.13 | 24-Aug-2017 |
ginsbach | The military/nautical time zones were added following RFC 822 and RFC 2822 specifications. Unfortunately they are specified incorrectly in RFC-822 and not very clearly in RFC 2822. RFC 1123 clearly states they are specified incorrectly - counting the wrong way from UTC - in RFC 822. RFC 2822 just states they were implemented in a non-standard way. Mea culpa for not noticing when originally implemented. Fix them so the correct calculations are made.
|
1.12 | 31-Oct-2015 |
christos | merge more the tests
|
1.11 | 31-Oct-2015 |
christos | Account for J, fix %Z
|
1.10 | 30-Oct-2015 |
christos | tests for %Z
|
1.9 | 30-Oct-2015 |
ginsbach | ISO 8601 and RFC 3339 specify that an offset can be up to 23:59 and not 12:00 east/west. Just proves that one shouldn't use other implementations as a canonical reference. Thanks to all who pointed this out.
|
1.8 | 30-Oct-2015 |
ginsbach | Additional tests for timezone offsets.
|
1.7 | 29-Oct-2015 |
christos | Add tests for %z
|
1.6 | 04-Jul-2015 |
christos | strptime now sets tm_yday
|
1.5 | 28-Apr-2015 |
ginsbach | Add hour tests as a standalone test case.
|
1.4 | 22-Apr-2015 |
ginsbach | Make century and year conversion tests a standalone test case rather than part of the "common" test case.
|
1.3 | 21-Apr-2015 |
ginsbach | Make seconds conversion tests a standalone test case rather than part of the "common" test case.
|
1.2 | 17-Apr-2015 |
ginsbach | Add more detail to test descriptions.
|
1.1 | 13-Jan-2011 |
pgoyette | Move t_mktime and t_strptime to their own ..../time/ subdirectory.
(Concurrence from christos@)
|
1.14.2.1 | 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.15.12.1 | 25-Mar-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #638):
lib/libc/time/strptime.c: revision 1.64 lib/libc/time/strptime.c: revision 1.65 tests/lib/libc/time/t_strptime.c: revision 1.16
strptime(3): Exercise some edge cases in the automatic tests.
Unfortunately, we can't quite use strptime as a black box to detect the cases that triggered undefined behaviour, because strptime just fails in that case anyway since the number that would go in .tm_year is far out of the representable range. PR lib/58041
strptime(3): Avoid arithmetic overflow. PR lib/58041
strptime(3): Reduce unnecessary indentation. Post-fix tidying. No functional change intended. PR lib/58041
|
1.15.4.1 | 24-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #1881):
lib/libc/time/strptime.c: revision 1.64 (patch) lib/libc/time/strptime.c: revision 1.65 (patch) lib/libc/time/strptime.c: revision 1.66 (patch) tests/lib/libc/time/t_strptime.c: revision 1.16 (patch)
strptime(3): Exercise some edge cases in the automatic tests.
Unfortunately, we can't quite use strptime as a black box to detect the cases that triggered undefined behaviour, because strptime just fails in that case anyway since the number that would go in .tm_year is far out of the representable range. PR lib/58041
strptime(3): Avoid arithmetic overflow. PR lib/58041
strptime(3): Reduce unnecessary indentation. Post-fix tidying. No functional change intended. PR lib/58041
strptime(3): Declare digit d as time_t.
This doesn't make a semantic difference -- d can only take on the ten values {0,1,2,3,4,5,6,7,8,9}, and the arithmetic with it later all comes out the same whether the type is unsigned or time_t, even if time_t were int32_t instead of int64_t.
But it pacifies overzealous compilers used by downstream users of this code. And while it's silly to use a much wider type (64-bit signed) than is needed here to store a single digit, it doesn't really hurt either (32-bit unsigned is much larger than needed too).
PR lib/58041
|