fsx: fixes to random seed
Not sure why, but with initstate()/setstate(), fsx generates
same events regadless of the input seed argument.
Change to use srandom() to fix the problem.
Add pid to auto random seed, so parallel fsx executions with auto
seed will use different seed values.
At this time there are 6 tests that use fsx, out of which:
2 use -S 0 as seed (gettime()) - generic/{075,112}
2 do not specify seed (default = 1) - generic/{091,263}
1 uses explicit constant seed - generic/127
1 uses explicit $RANDOM seed - generic/231
This change affects all those tests.
The tests that intended to randomize the seed will now really
randomize the seed.
The tests that intended to use a constant seed will still use
a constant seed, but resulting event sequence will be different
than before this change.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>