Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtests: make random seed fixed for a month #4734

Closed
wants to merge 1 commit into from

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 18, 2019

When using randomized features of runtests (-R and --shallow) it is
useful to have a fixed random seed to make sure for example extra
commits in a branch or a rebase won't change the seed that would make
repeated runs work differently.

As it is also useful to change seed sometimes, the default seed is now
determined based on the current month. When the month changes, so will
the random seed.

The specific seed is also shown in the standard test suite top header
and it can be set explictly with the new --seed=[num] option so that the
exact order of a previous run can be achieved.

@bagder bagder added the tests label Dec 18, 2019
@bagder
Copy link
Member Author

@bagder bagder commented Dec 19, 2019

Took it to the mailing list. Idea to add to the current code:

add a hash of the "system" string to the seed number, so that each different system will have its own fixed seed for the month.

@bagder bagder force-pushed the bagder/runtests-seed-monthly branch from b44fb26 to cc8e3fe Dec 19, 2019
@bagder
Copy link
Member Author

@bagder bagder commented Dec 19, 2019

Update: made it use year + month + first line of curl -V output.

When using randomized features of runtests (-R and --shallow) it is
useful to have a fixed random seed to make sure for example extra
commits in a branch or a rebase won't change the seed that would make
repeated runs work differently.

As it is also useful to change seed sometimes, the default seed is now
determined based on the current month (and first line curl -V
output). When the month changes, so will the random seed.

The specific seed is also shown in the standard test suite top header
and it can be set explictly with the new --seed=[num] option so that the
exact order of a previous run can be achieved.
@bagder bagder force-pushed the bagder/runtests-seed-monthly branch from cc8e3fe to ccf1890 Jan 4, 2020
@bagder bagder closed this in a7d4693 Jan 9, 2020
@bagder bagder deleted the bagder/runtests-seed-monthly branch Jan 9, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.