datastruct/log: seed the RNG per thread in logtorture
Same defect as skiplisttorture: main() calls srandom(time(NULL)), randseed is
__thread, and the stresstest workers never seed, so stresstest_reader() draws
its lookup indices from the default sequence -- the same one in every reader.
Seed each thread with setrandom_thread(), offsetting the updaters past the
readers as in skiplisttorture.
This one only shows up under --stresstest; --smoketest never reaches the draw,
which is why it is easy to miss.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 file changed