Merge "tests: Clean up use of mt_rand()"