[cmake-developers] OpenBSD and srand()/rand() changes

David Cole DLRdave at aol.com
Sat Dec 13 22:30:08 EST 2014


The utility of the determinism is all about enabling test suites to
pass even if they use "random" behavior. How the determinism is
achieved, I don't really care.

As long as tests that use "random" behavior have predictable results.

It doesn't matter to me if they have platform differences. As long as
the expected test results account for any differences that do exist,
the goal can still be satisfied: predictable results.

thx,
D


On Sat, Dec 13, 2014 at 1:05 PM, Ben Boeckel <ben.boeckel at kitware.com> wrote:
> On Thu, Dec 11, 2014 at 14:41:36 -0500, David Cole via cmake-developers wrote:
>> Yes, setting an explicit seed should make subsequent calls to random
>> be deterministic...
>
> Well, *we* want that, but I don't think that OpenBSD is making an
> *awful* decision here.
>
> Even if you want deterministic, you're only deterministic on a single
> platform, so if you want to get a deterministicly random (such an odd
> phrase…) sequence, the best thing to do is to code up an Mersenne
> Twister or something and ignore the rand/srand functions.
>
> --Ben


More information about the cmake-developers mailing list