Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 677386

Summary: app-crypt/dieharder: some tests fail incorrectly on 64 bits OS
Product: Gentoo Linux Reporter: vm666
Component: Current packagesAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED FIXED    
Severity: normal Keywords: TESTFAILURE
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description vm666 2019-02-06 18:53:40 UTC
"dieharder -g 500 -a" for /dev/random and "dieharder -g 501 -a" for /dev/urandom will fail on 64 bits systems at least.
Linux PRNG is perfectly fine, this is a bug in Dieharder. AFAIK there is no fix upstream, so we should patch it, at least temporarily.
This bug was also reported on RedHat. 
See https://bugzilla.redhat.com/show_bug.cgi?id=803292


$  dieharder -g 501 -a
...
diehard_count_1s_byt|   0|    256000|     100|0.33526925|  PASSED  
 diehard_parking_lot|   0|     12000|     100|0.00000000|  FAILED  
    diehard_2dsphere|   2|      8000|     100|0.00000000|  FAILED  
    diehard_3dsphere|   3|      4000|     100|0.00000000|  FAILED  
     diehard_squeeze|   0|    100000|     100|0.00000000|  FAILED  
        diehard_sums|   0|       100|     100|0.00000000|  FAILED  
        diehard_runs|   0|    100000|     100|0.85462322|  PASSED  
        diehard_runs|   0|    100000|     100|0.54016419|  PASSED  
...
Comment 1 Larry the Git Cow gentoo-dev 2019-02-07 21:03:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=132ea93627a905045caf6a6227b7f0c65b49f24c

commit 132ea93627a905045caf6a6227b7f0c65b49f24c
Author:     Alon Bar-Lev <alonbl@gentoo.org>
AuthorDate: 2019-02-07 21:02:46 +0000
Commit:     Alon Bar-Lev <alonbl@gentoo.org>
CommitDate: 2019-02-07 21:03:18 +0000

    app-crypt/dieharder: fix random on 64bit
    
    Closes: https://bugs.gentoo.org/show_bug.cgi?id=677386
    Thanks: vm666
    Signed-off-by: Alon Bar-Lev <alonbl@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 app-crypt/dieharder/dieharder-3.31.1-r2.ebuild     | 56 ++++++++++++++
 .../files/dieharder-3.31.1-urandom-64bit.patch     | 87 ++++++++++++++++++++++
 2 files changed, 143 insertions(+)