[foozzie] Prepare passing the session random-seed to the fuzz config

In order to migrate the extra flags into the fuzzer and keep bisection stable,
we need to use the same RNG state for each call to generating fuzz flags.

Throughout one fuzzing session the same random-seed is used
(https://crbug.com/983128) and we'll pass it to the fuzz config in a follow up.

TBR=tmrts@chromium.org
NOTRY=true

Bug: chromium:813833
Change-Id: I3203c86028a5d283238e6ef739f82eccee1302b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697254
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62646}
This commit is contained in:
Michael Achenbach 2019-07-11 15:49:25 +02:00 committed by Commit Bot
parent 58a6447814
commit 80ba1aa982

View File

@ -24,7 +24,16 @@ FOOZZIE_EXPERIMENTS = [
]
class Config(object):
def __init__(self, name, rng=None):
def __init__(self, name, rng=None, random_seed=None):
"""
Args:
name: Name of the used fuzzer.
rng: Random number generator for generating experiments.
random_seed: Random-seed used for d8 throughout one fuzz session.
TODO(machenbach): Remove random_seed after a grace period of a couple of
days. We only have it to keep bisection stable. Afterwards we can just
use rng.
"""
self.name = name
self.rng = rng or random.Random()