Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Test suite failure in version 0.9.0 #12

Closed
peti opened this issue Oct 21, 2014 · 6 comments
Closed

Test suite failure in version 0.9.0 #12

peti opened this issue Oct 21, 2014 · 6 comments

Comments

@peti
Copy link

peti commented Oct 21, 2014

A complete log file of the test run is at http://hydra.nixos.org/build/16373034/nixlog/1/raw.

@peti
Copy link
Author

peti commented Oct 21, 2014

Note that this error occurred on Linux/i686. I didn't see it on Linux/x86_64. Not sure whether that's relevant, though.

peti added a commit to NixOS/nixpkgs that referenced this issue Oct 21, 2014
@peti
Copy link
Author

peti commented Feb 20, 2015

Ping?

@stere0id
Copy link

Same problem here. Also works on 32bit but not on 64bit linux.

@trofi
Copy link

trofi commented Aug 31, 2015

Encountered it as well. The problem here suggests it's a couple of issues

  • issue with Int size issue in year definition
  • issue with test that passes out-of-range values to TimeUTC (cound be an Int overflow side effect), comment says it in 1950-2050 range
got:      Right [ASN1Time TimeUTC (... {dateYear = 2011, ...
expected: Right [ASN1Time TimeUTC (...{dateYear = 1911, ...
*Data.ASN1.Types> :info Date      
data Date
  = Date {dateYear :: {-# UNPACK #-}Int,
          dateMonth :: !Month,
          dateDay :: {-# UNPACK #-}Int}
        -- Defined in ‘Data.Hourglass.Types’

@trofi
Copy link

trofi commented Aug 31, 2015

Another weird discrepancy comes from normalizeDate function:

normalizeDate: (Date {dateYear = 2046, dateMonth = May, dateDay = 1},"->",Date {dateYear = 1910, dateMonth = March, dateDay = 25})

trofi added a commit to gentoo-haskell/gentoo-haskell that referenced this issue Aug 31, 2015
On 32-bit systems Hourglass silently breaks dates
out of range '1970 +- 68' years due to use of
'time_t' and 'gmtime_r' from installed libc.

Workaround test failures by not testing times out of this range.

Github-bug: vincenthz/hs-hourglass#21
Github-bug: vincenthz/hs-asn1#12

Package-Manager: portage-2.2.20
mgorny pushed a commit to gentoo/gentoo that referenced this issue Aug 31, 2015
On 32-bit systems Hourglass silently breaks dates
out of range '1970 +- 68' years due to use of
'time_t' and 'gmtime_r' from installed libc.

Workaround test failures by not testing times out of this range.

Github-bug: vincenthz/hs-hourglass#21
Github-bug: vincenthz/hs-asn1#12

Package-Manager: portage-2.2.20
@vincenthz
Copy link
Owner

I've hacked the test to not generate offending dates; this doesn't warrant more fixing I think, 32 bit time_t shouldn't be acceptable anymore really.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants