qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Thomas Huth
Subject: Re: [kvm-unit-tests PATCH v9 4/9] lib: add isaac prng library from CCAN
Date: Fri, 3 Dec 2021 10:15:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

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@linaro.org>
CC: Timothy B. Terriberry <tterribe@xiph.org>
Acked-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20211118184650.661575-6-alex.bennee@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@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]