Page MenuHomeFreeBSD

fsx: seed more randomly with the -S0 option
ClosedPublic

Authored by asomers on Apr 26 2019, 8:05 PM.
Tags
None
Referenced Files
F132523666: D20078.id56787.diff
Fri, Oct 17, 4:01 PM
F132523665: D20078.id56786.diff
Fri, Oct 17, 4:01 PM
F132523650: D20078.id56727.diff
Fri, Oct 17, 4:01 PM
F132523642: D20078.id.diff
Fri, Oct 17, 4:01 PM
F132482941: D20078.diff
Fri, Oct 17, 7:24 AM
Unknown Object (File)
Tue, Oct 14, 5:36 AM
Unknown Object (File)
Sun, Oct 12, 1:56 AM
Unknown Object (File)
Wed, Oct 8, 5:58 PM
Subscribers

Details

Summary

fsx: seed more randomly with the -S0 option

When using -S0, seed the PRNG with the current time in nanoseconds, not
seconds, so consecutive runs don't accidentally use the same seed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This change is very reasonable.

FWIW, I wish there was a standard upstream source for fsx. A number of different OSes have their own version of fsx with their own set of bugs.

tools/regression/fsx/fsx.c
278–280 ↗(On Diff #56727)

Thought: I think this could be better done in terms of actual intermediate variables, instead of a comment, for clarity.

This revision is now accepted and ready to land.Apr 28 2019, 5:09 PM

Respond to ngie's suggestions

This revision now requires review to proceed.Apr 28 2019, 5:14 PM
This revision is now accepted and ready to land.Apr 28 2019, 5:24 PM
This revision was automatically updated to reflect the committed changes.