From 9712d5ebe62186e29fd6cbb3d1f6ec4f338c9576 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Wed, 13 Sep 2017 19:08:35 -0700 Subject: [PATCH] [fuzzer] Fix bugs in fuzz.py --- tests/fuzz/fuzz.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/fuzz/fuzz.py b/tests/fuzz/fuzz.py index 1384bc48e..0ce201cdd 100755 --- a/tests/fuzz/fuzz.py +++ b/tests/fuzz/fuzz.py @@ -540,7 +540,7 @@ def regression_parser(args): if target == 'all': targets = targets.union(TARGETS) elif target in TARGETS: - targets = targets.add(target) + targets.add(target) else: raise RuntimeError('{} is not a valid target'.format(target)) args.TARGET = list(targets) @@ -635,13 +635,17 @@ def gen(args): cmd = [ args.decodecorpus, '-n{}'.format(args.number), - '--max-content-size-log={}'.format(args.max_size_log), '-p{}/'.format(compressed), '-o{}'.format(decompressed), ] if 'block_' in args.TARGET: - cmd += ['--gen-blocks'] + cmd += [ + '--gen-blocks', + '--max-block-size-log={}'.format(args.max_size_log) + ] + else: + cmd += ['--max-content-size-log={}'.format(args.max_size_log)] print(' '.join(cmd)) subprocess.check_call(cmd)