bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] test-posixtm.c: add two tests


From: Paul Eggert
Subject: [PATCH] test-posixtm.c: add two tests
Date: Wed, 22 Dec 2010 12:29:43 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

* tests/test-posixtm.c: Add two tests, to highlight the
bug in Solaris 10 (and earlier) localtime.  Gnulib doesn't work
around this bug; this is merely to document it.
---
 ChangeLog            |    7 +++++++
 tests/test-posixtm.c |    6 ++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 80d4552..2dc4aeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-22  Paul Eggert  <address@hidden>
+
+       test-posixtm.c: add two tests
+       * tests/test-posixtm.c: Add two tests, to highlight the
+       bug in Solaris 10 (and earlier) localtime.  Gnulib doesn't work
+       around this bug; this is merely to document it.
+
 2010-12-22  Bruno Haible  <address@hidden>
 
        getlogin_r: Work around portability problem on OSF/1.
diff --git a/tests/test-posixtm.c b/tests/test-posixtm.c
index 18e9e36..a8bffc0 100644
--- a/tests/test-posixtm.c
+++ b/tests/test-posixtm.c
@@ -46,7 +46,13 @@ static struct posixtm_test const T[] =
     { "12131415.16",     13, 1,            0}, /* ??? Dec 13 14:15:16 ???? */
     { "12131415",        13, 1,            0}, /* ??? Dec 13 14:15:00 ???? */
 
+    /* These two tests fail on 64-bit Solaris up through at least
+       Solaris 10, which is off by one day for time stamps before
+       0001-01-01 00:00:00 UTC.  */
     { "000001010000.00", 13, 1, -62167219200}, /* Sat Jan  1 00:00:00 0    */
+    { "000012312359.59", 13, 1, -62135596801}, /* Fri Dec 31 23:59:59 0    */
+
+    { "000101010000.00", 13, 1, -62135596800}, /* Sat Jan  1 00:00:00 1    */
     { "190112132045.51", 13, 1,  -2147483649}, /* Fri Dec 13 20:45:51 1901 */
     { "190112132045.52", 13, 1,  -2147483648}, /* Fri Dec 13 20:45:52 1901 */
     { "190112132045.53", 13, 1,  -2147483647}, /* Fri Dec 13 20:45:53 1901 */
-- 
1.7.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]