If booth -seed and -jobs are set we could set deterministic but unique seed for
each jobs by combining input seed with a job number.
Details
- Reviewers
kcc
Diff Detail
- Build Status
Buildable 4570 Build 4570: arc lint + arc unit
Event Timeline
Rationlaly it exactly the same a for -seed. It's used to make execution deterministic (e.g. for debugging).
Currently it is deterministic, but -seed=1 and -jobs=24 pointlessly runs 24 exactly same fuzzers.
I don't care much about the test, I can undo this part, but
You can not have deterministic execution with -jobs=N when running on the same corpus because the corpus is reloaded (i.e. you have concurrent execution).
If you want to run N deterministic executions in parallel, simply do a shell loop.
if you don't provide corpus, it's determenistic
i am using this just for benchmarks and just to look at coverage
Behavior with change makes more sense to me.
It's not something that make code complicated.
imho this is a completely unnecessary complication.
To get what you need simply do this:
for((i=1;i<=20;i++)); do ./fuzz -seed=$i & done; wait
it's not easy to emulate -jobs in a script, because -jobs=N works together with -workers=M and if N > M new jos start after some old die.
And user has to go this inconvenient way if jobs and seed both are desired.
I agree that
convenience(jobs+seed) < convenience(jobs)
complexity(jobs) < convenience(jobs)
but also
complexity(jobs+seed) < complexity(jobs)
It's still not clear to my why complexity(jobs+seed) > convenience(jobs+seed)
You are the first user to request this :)
And you are also not really a user, but a developer :)
I agree that
convenience(jobs+seed) < convenience(jobs)
complexity(jobs) < convenience(jobs)
but also
complexity(jobs+seed) < complexity(jobs)It's still not clear to my why complexity(jobs+seed) > convenience(jobs+seed)
With you change, you will also need to document the non-intuitive behavior.
In all such cases it's easier to not have non-intuitive behavior