[th/random] add mechanism for generating random numbers for fuzzing
there should be a way to run tests with some randomness (fuzzing).
There are simply too many combinations that would be interesting to test, but we cannot cover them all (either because we don't even think about that combination, or because we also don't have the resources (time) for running so many (variations of) tests).
This will be combined with a NMCI_RANDOM_SEED
environment variable. If that environment variable is set, our tests should always play variant. We will also log the chosen seed, so if you see a failure, you can obtain the seed that was used and reproduce it.
If NMCI_RANDOM_SEED
is unset, we generate a random seed. We will also persist that to .tmp/rnd_global_seed
-- but only for the duration of the current test. That is so that all python/nmci commands use the same seed while running that one test. After the current test, .tmp/rnd_global_seed
should be wiped.
Just an early RFC. Not yet all perfect.