HomeFreeBSD

tools: add arc4random_uniform() bias test

Description

tools: add arc4random_uniform() bias test

This test program executed arc4random_uniform() repeatedly and
analyzes the distribution of return values, showing how similar
the parameters of the observed outcome are to the expected
parameters of an equidistribution.

This cannot be a unit test as it takes quite a while to run and
lots of memory (~3 GB) to execute.

Reviewed by: cem
Approved by: emaste
Differential Revision: https://reviews.freebsd.org/D47659

Details

Provenance
fuzAuthored on Nov 27 2024, 5:37 PM
Reviewer
cem
Differential Revision
D47659: lib/libc/gen: use Lemire's algorithm for arc4random_uniform().
Parents
rG1730b5c7916e: lib/libc/tests: add unit test for arc4random_uniform()
Branches
Unknown
Tags
Unknown