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
F149509354: D20078.id.diff
Tue, Mar 24, 10:44 PM
Unknown Object (File)
Tue, Mar 24, 12:35 AM
Unknown Object (File)
Mon, Mar 23, 9:53 PM
Unknown Object (File)
Mon, Mar 23, 8:32 PM
Unknown Object (File)
Fri, Mar 20, 4:25 PM
Unknown Object (File)
Wed, Mar 18, 6:07 PM
Unknown Object (File)
Sun, Mar 15, 8:52 AM
Unknown Object (File)
Sat, Feb 28, 8:47 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 Passed
Unit
No Test Coverage
Build Status
Buildable 23943
Build 22860: arc lint + arc unit

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

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.