diff options
-rwxr-xr-x | scripts/fuzz_opt.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index decd01f4a..0a0fd679b 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -102,12 +102,11 @@ def no_pass_debug(): def randomize_feature_opts(): global FEATURE_OPTS FEATURE_OPTS = CONSTANT_FEATURE_OPTS[:] - # half the time apply all the possible opts. this lets all test runners work at max - # capacity at least half the time, as otherwise if they need almost all the opts, the - # chance of getting them is exponentially small. - if random.random() < 0.5: + # 1/3 the time apply all the possible opts, 1/3 none of them, to maximize + # coverage both ways, and 1/3 pick each one randomly + if random.random() < 0.33333: FEATURE_OPTS += POSSIBLE_FEATURE_OPTS - else: + elif random.random() < 0.5: for possible in POSSIBLE_FEATURE_OPTS: if random.random() < 0.5: FEATURE_OPTS.append(possible) |