[kvm-unit-tests PATCH v9 4/9] lib: add isaac prng library from CCAN

Thomas Huth thuth at redhat.com
Fri Dec 3 01:15:04 PST 2021


On 02/12/2021 12.53, Alex Bennée wrote:
> It's often useful to introduce some sort of random variation when
> testing several racing CPU conditions. Instead of each test implementing
> some half-arsed PRNG bring in a a decent one which has good statistical
> randomness. Obviously it is deterministic for a given seed value which
> is likely the behaviour you want.
> 
> I've pulled in the ISAAC library from CCAN:
> 
>      http://ccodearchive.net/info/isaac.html
> 
> I shaved off the float related stuff which is less useful for unit
> testing and re-indented to fit the style. The original license was
> CC0 (Public Domain) which is compatible with the LGPL v2 of
> kvm-unit-tests.
> 
> Signed-off-by: Alex Bennée <alex.bennee at linaro.org>
> CC: Timothy B. Terriberry <tterribe at xiph.org>
> Acked-by: Andrew Jones <drjones at redhat.com>
> Message-Id: <20211118184650.661575-6-alex.bennee at linaro.org>
> ---
>   arm/Makefile.common |   1 +
>   lib/prng.h          |  82 ++++++++++++++++++++++
>   lib/prng.c          | 162 ++++++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 245 insertions(+)
>   create mode 100644 lib/prng.h
>   create mode 100644 lib/prng.c
Acked-by: Thomas Huth <thuth at redhat.com>




More information about the linux-arm-kernel mailing list