[DTrace-devel] rand() issues

Kris Van Hees kris.van.hees at oracle.com
Sun Nov 21 21:47:13 UTC 2021


I gave a reviewed-by on your rand() patch and added it to my queue branch to
push to dev.

Running some iterations of tests for other features, I noticed that (on OL8
x86_64, which is the only place I was testing some other things) the rand
tests:

test/unittest/funcs/tst.rand_inter.sh
test/unittest/funcs/tst.rand_intra.sh

are intermittently failing.  Looking closer at these tests, I am a bit unclear
why we have them.  They seem to be testing the quality of the rand() function,
which amounts to testing the quality of the random number generator function in
BPF itself.  That is not really we should be testing because we have no control
over it, and DTrace does not actually impose quality expectations on the pseudo
random generator that rand() provides.

So, I'd prefer that we either remove those tests as not being relevant to the
rand() implementation itself (and out of our control to ensure they pass), or
rework them in a way that they will consistently pass (and then document why
we expect them to pass and what should be done if they do not).

I think I favour the option of removing them simply because it seems rather
impractical and unnecessary to maintain a test for something outside of DTrace
in terms of assertions that do not reflect expectations that DTrace places on
rand().

	Kris

Kris



More information about the DTrace-devel mailing list