tests: seed rand when adding test and call srand() before test->func().