From 80ba1aa982d84a4e82f37250feec4a3a1480af24 Mon Sep 17 00:00:00 2001 From: Michael Achenbach Date: Thu, 11 Jul 2019 15:49:25 +0200 Subject: [PATCH] [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 Reviewed-by: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#62646} --- tools/clusterfuzz/v8_fuzz_config.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/clusterfuzz/v8_fuzz_config.py b/tools/clusterfuzz/v8_fuzz_config.py index 5503482ef1..b557a64ce8 100644 --- a/tools/clusterfuzz/v8_fuzz_config.py +++ b/tools/clusterfuzz/v8_fuzz_config.py @@ -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()