haskell / mwc-random

A very fast Haskell library for generating high quality pseudo-random numbers.
http://hackage.haskell.org/package/mwc-random
BSD 2-Clause "Simplified" License
54 stars 25 forks source link

32bit testsuite: System/Random/MWC.hs:43: failure in expression `uniformRM (1,200) g :: IO Int' #79

Closed juhp closed 2 years ago

juhp commented 2 years ago

For mwc-random-0.15.0.1 built with ghc-8.10.5 (lts-18 packages) the testsuite is failing on 32bit Linux systems:

see https://koji.fedoraproject.org/koji/taskinfo?taskID=73449959

Running 2 test suites...
Test suite mwc-doctests: RUNNING...
System/Random/MWC.hs:43: failure in expression `uniformRM (1,200) g :: IO Int'
expected: 101
 but got: 119
           ^
Examples: 32  Tried: 14  Errors: 0  Failures: 1
Test suite mwc-doctests: FAIL
Test suite logged to: dist/test/mwc-random-0.15.0.1-mwc-doctests.log
Test suite mwc-prop-tests: RUNNING...
Test suite mwc-prop-tests: PASS
Test suite logged to: dist/test/mwc-random-0.15.0.1-mwc-prop-tests.log
1 of 2 test suites (1 of 2 test cases) passed.

For now I will disable the testsuite for armv7hl and i686 for Fedora 35.

Shimuuar commented 2 years ago

Thanks for the report. It's bug in doctests. Int work differently on 32-bit and 64-bit platform. I'll upload fix shortly

Shimuuar commented 2 years ago

Fix uploaded as 0.15.0.2 on hackage