cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1745964 ] self test failures in TAI timezones

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 10 Jul 2007 15:28:22 -0700

Bugs item #1745964, was opened at 2007-07-01 01:43
Message generated for change (Comment added) made by dfandrich
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1745964&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
Status: Open
>Resolution: Accepted
Priority: 3
Private: No
Submitted By: Daniel Black (grooverdan)
Assigned to: Daniel Stenberg (bagder)
Summary: self test failures in TAI timezones

Initial Comment:
as reported by Rickard Närström in https://bugs.gentoo.org/show_bug.cgi?id=183716:

 $ TZ=right/Europe/Stockholm ./runtests.pl -a -k 31 46 61 506 517
********* System characteristics ********
* curl 7.16.3 (x86_64-pc-linux-gnu)
* libcurl/7.16.3 OpenSSL/0.9.8d zlib/1.2.3 libidn/0.6.5
* Features: IDN Largefile NTLM SSL libz
* Host: passivegrunt
* System: Linux passivegrunt 2.6.21-gentoo #1 SMP Sun May 27 21:57:49 EST 2007 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux
* Server SSL: ON
* libcurl SSL: ON
* libcurl debug: OFF
* valgrind: OFF
* HTTP IPv6 OFF
* FTP IPv6 OFF
* HTTP port: 8990
* FTP port: 8992
* FTP port 2: 8995
* FTPS port: 8993
* HTTPS port: 8991
* TFTP port: 8997
* SCP/SFTP port: 8999
* SOCKS port: 9000
* SSL library: OpenSSL
* Libtool lib: ON
*****************************************
test 031...[HTTP with weirdly formatted cookies and cookiejar storage]

 output FAILED:
--- log/check-expected 2007-07-01 10:39:25.000000000 +0200
+++ log/check-generated 2007-07-01 10:39:25.000000000 +0200
@@ -4,4 +4,4 @@

 .127.0.0.1 TRUE /silly/ FALSE 0 ismatch this
 .127.0.0.1 TRUE / FALSE 0 partmatch present
-127.0.0.1 FALSE /we/want/ FALSE 2054030187 nodomain value
+127.0.0.1 FALSE /we/want/ FALSE 2054030210 nodomain value
test 046...[HTTP, get cookies and store in cookie jar]

 output FAILED:
--- log/check-expected 2007-07-01 10:39:25.000000000 +0200
+++ log/check-generated 2007-07-01 10:39:25.000000000 +0200
@@ -6,7 +6,7 @@
 www.loser.com FALSE / FALSE 1139150993 UID 99
 127.0.0.1 FALSE / FALSE 1439150993 mooo indeed
 127.0.0.1 FALSE / FALSE 0 empty
-127.0.0.1 FALSE / FALSE 2054030187 ckyPersistent permanent
+127.0.0.1 FALSE / FALSE 2054030210 ckyPersistent permanent
 127.0.0.1 FALSE / FALSE 0 ckySession temporary
 127.0.0.1 FALSE / FALSE 0 ASPSESSIONIDQGGQQSJJ GKNBDIFAAOFDPDAIEAKDIBKE
 127.0.0.1 FALSE / FALSE 0 justaname
test 061...[HTTP with various cookies and custom Host:]

 output FAILED:
--- log/check-expected 2007-07-01 10:39:25.000000000 +0200
+++ log/check-generated 2007-07-01 10:39:25.000000000 +0200
@@ -2,6 +2,6 @@
 # http://curlm.haxx.se/rfc/cookie_spec.html
 # This file was generated by libcurl! Edit at your own risk.

-.foo.com TRUE /we/want/ FALSE 2054030187 test yes
-.host.foo.com TRUE /we/want/ FALSE 2054030187 test2 yes
+.foo.com TRUE /we/want/ FALSE 2054030210 test yes
+.host.foo.com TRUE /we/want/ FALSE 2054030210 test2 yes
 .foo.com TRUE /moo TRUE 0 test3 maybe
test 506...[HTTP with shared cookie list (and dns cache)]

 output FAILED:
--- log/check-expected 2007-07-01 10:39:25.000000000 +0200
+++ log/check-generated 2007-07-01 10:39:25.000000000 +0200
@@ -2,8 +2,8 @@
 # http://curlm.haxx.se/rfc/cookie_spec.html
 # This file was generated by libcurl! Edit at your own risk.

-.foo.com TRUE / FALSE 1993463787 test1 overwritten1
-.host.foo.com TRUE / FALSE 1896263787 test2 two
-.foo.com TRUE / FALSE 1896263787 test3 three
-.host.foo.com TRUE / FALSE 2061978987 test4 overwritten4
-.host.foo.com TRUE / FALSE 1896263787 test5 five
+.foo.com TRUE / FALSE 1993463810 test1 overwritten1
+.host.foo.com TRUE / FALSE 1896263810 test2 two
+.foo.com TRUE / FALSE 1896263810 test3 three
+.host.foo.com TRUE / FALSE 2061979010 test4 overwritten4
+.host.foo.com TRUE / FALSE 1896263810 test5 five
test 517...[curl_getdate() testing]

 stdout FAILED:
--- log/check-expected 2007-07-01 10:39:25.000000000 +0200
+++ log/check-generated 2007-07-01 10:39:25.000000000 +0200
@@ -1,22 +1,22 @@
-0: Sun, 06 Nov 1994 08:49:37 GMT => 784111777
-1: Sunday, 06-Nov-94 08:49:37 GMT => 784111777
-2: Sun Nov 6 08:49:37 1994 => 784111777
-3: 06 Nov 1994 08:49:37 GMT => 784111777
-4: 06-Nov-94 08:49:37 GMT => 784111777
-5: Nov 6 08:49:37 1994 => 784111777
-6: 06 Nov 1994 08:49:37 => 784111777
-7: 06-Nov-94 08:49:37 => 784111777
-8: 1994 Nov 6 08:49:37 => 784111777
-9: GMT 08:49:37 06-Nov-94 Sunday => 784111777
-10: 94 6 Nov 08:49:37 => 784111777
-11: 1994 Nov 6 => 784080000
-12: 06-Nov-94 => 784080000
-13: Sun Nov 6 94 => 784080000
-14: 1994.Nov.6 => 784080000
-15: Sun/Nov/6/94/GMT => 784080000
-16: Sun, 06 Nov 1994 08:49:37 CET => 784108177
-17: 06 Nov 1994 08:49:37 EST => 784129777
-18: Sun, 12 Sep 2004 15:05:58 -0700 => 1095026758
-19: Sat, 11 Sep 2004 21:32:11 +0200 => 1094931131
-20: 20040912 15:05:58 -0700 => 1095026758
-21: 20040911 +0200 => 1094853600
+0: Sun, 06 Nov 1994 08:49:37 GMT => 784111796
+1: Sunday, 06-Nov-94 08:49:37 GMT => 784111796
+2: Sun Nov 6 08:49:37 1994 => 784111796
+3: 06 Nov 1994 08:49:37 GMT => 784111796
+4: 06-Nov-94 08:49:37 GMT => 784111796
+5: Nov 6 08:49:37 1994 => 784111796
+6: 06 Nov 1994 08:49:37 => 784111796
+7: 06-Nov-94 08:49:37 => 784111796
+8: 1994 Nov 6 08:49:37 => 784111796
+9: GMT 08:49:37 06-Nov-94 Sunday => 784111796
+10: 94 6 Nov 08:49:37 => 784111796
+11: 1994 Nov 6 => 784080019
+12: 06-Nov-94 => 784080019
+13: Sun Nov 6 94 => 784080019
+14: 1994.Nov.6 => 784080019
+15: Sun/Nov/6/94/GMT => 784080019
+16: Sun, 06 Nov 1994 08:49:37 CET => 784108196
+17: 06 Nov 1994 08:49:37 EST => 784129796
+18: Sun, 12 Sep 2004 15:05:58 -0700 => 1095026780
+19: Sat, 11 Sep 2004 21:32:11 +0200 => 1094931153
+20: 20040912 15:05:58 -0700 => 1095026780
+21: 20040911 +0200 => 1094853622
TESTDONE: 0 tests out of 5 reported OK: 0%
TESTFAIL: These test cases failed: 31 46 61 506 517
TESTDONE: 5 tests were considered during 2 seconds.

----------------------------------------------------------------------

>Comment By: Dan Fandrich (dfandrich)
Date: 2007-07-10 15:28

Message:
Logged In: YES
user_id=236775
Originator: NO

I've committed the TZ=GMT patch in CVS.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2007-07-10 14:08

Message:
Logged In: YES
user_id=1110
Originator: NO

So I guess setting TZ to GMT (or perhaps something that isn't exactly the
same as UTC but still is a UTC-based timezone) unconditionally in the test
suite sounds like a good idea to at least avoid people getting these
failures.

ricce_n, any opinions?

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2007-07-09 11:41

Message:
Logged In: YES
user_id=236775
Originator: NO

I tried the <setenv> trick and it worked on Linux.

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2007-07-08 13:58

Message:
Logged In: YES
user_id=236775
Originator: NO

What about forcing the time zone to GMT from the test harness when running
this (or all) scripts? This might be as simple as adding
<setenv>TZ=GMT</setenv> in the script, although it would need to be
verified on non-POSIX platforms.

----------------------------------------------------------------------

Comment By: Daniel Black (grooverdan)
Date: 2007-07-08 05:53

Message:
Logged In: YES
user_id=612034
Originator: YES

i agree. I couldn't find a real solution without refactoring the test
expects for TAI timezones.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2007-07-07 13:44

Message:
Logged In: YES
user_id=1110
Originator: NO

That's certainly not what the _test suite_ assumes. That's what libcurl,
its time+date parser and/or the underlying date functions assume.

Feel free to work on a fix, I personally have no plans on doing that
within the near future as I consider this a minor flaw effecting a rare
few.

----------------------------------------------------------------------

Comment By: ricce_n (ricce_n)
Date: 2007-07-07 04:09

Message:
Logged In: YES
user_id=1056183
Originator: NO

TAI timezones adds leap seconds corrections.

Your test suite assumes that every day have exactly 24*60*60 seconds witch
is the case in UTC time but not in TAI.

See those pages for more info:
http://www.thedjbway.org/clockspeed/leapsecs.html
http://cr.yp.to/proto/utctai.html

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2007-07-01 08:14

Message:
Logged In: YES
user_id=1110
Originator: NO

I have no idea how TAI time zones differ from UTC ones, and I also don't
see how libcurl bothers about timezones anywhere really (except for parsing
times) so what _can_ we do about this?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1745964&group_id=976
Received on 2007-07-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET