In testutil, we should add "getopt" support for -PS as indicated in the tech design. Specifically, support for:
- Using -PS to set read seed, write seed or both.
- Setting random read/write seeds when not specified.
- Printing the seeds in a way that makes them easily usable
Since there are two random number generators (read and write) and seeds for each, I'd propose a slight change to the naming in the tech design to avoid confusion. All random seeds will use decimal numbers and will be prepended by W or R . So it is clear that W7296 is a seed for the write PRNG, and if we say -PS W7296,R98761, it is seeding both PRNGs, and it's the same as -PS R98761,W7296, we don't have to get the ordering right. And when we're printing seeds, like at the beginning of a run, we should have formats available so that we can print: -PS W7296,R98761, so it can be cut/pasted easily.
To keep the numbers from getting out of control (who wants to eyeball compare 10 digit numbers to see if two runs are using the same seed?), we should initially choose seeds <= 16 bits long. That will give us a huge amount of variance for testing (multiplied by huge, since we have two PRNGs). We'll use PRNGs that support larger seeds in case we need to go there in the future.