Skip to content

Commit 3205871

Browse files
MarcoFalkefurszy
authored andcommitted
fuzz: Remove option --export_coverage from test_runner
The coverage statistics are not stable across clang versions
1 parent 52693ee commit 3205871

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

test/fuzz/test_runner.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ def main():
2525
default="INFO",
2626
help="log events at this level and higher to the console. Can be set to DEBUG, INFO, WARNING, ERROR or CRITICAL. Passing --loglevel DEBUG will output all logs to console.",
2727
)
28-
parser.add_argument(
29-
'--export_coverage',
30-
action='store_true',
31-
help='If true, export coverage information to files in the seed corpus',
32-
)
3328
parser.add_argument(
3429
'seed_dir',
3530
help='The seed corpus to run on (must contain subfolders for each fuzz target).',
@@ -109,7 +104,6 @@ def main():
109104
corpus=args.seed_dir,
110105
test_list=test_list_selection,
111106
build_dir=config["environment"]["BUILDDIR"],
112-
export_coverage=args.export_coverage,
113107
)
114108

115109

@@ -129,7 +123,7 @@ def merge_inputs(*, corpus, test_list, build_dir, merge_dir):
129123
logging.debug('Output: {}'.format(output))
130124

131125

132-
def run_once(*, corpus, test_list, build_dir, export_coverage):
126+
def run_once(*, corpus, test_list, build_dir):
133127
for t in test_list:
134128
args = [
135129
os.path.join(build_dir, 'src', 'test', 'fuzz', t),
@@ -149,13 +143,6 @@ def run_once(*, corpus, test_list, build_dir, export_coverage):
149143
logging.info(e.stderr)
150144
logging.info("Target \"{}\" failed with exit code {}: {}".format(t, e.returncode, " ".join(args)))
151145
sys.exit(1)
152-
if not export_coverage:
153-
continue
154-
for l in output.splitlines():
155-
if 'INITED' in l:
156-
with open(os.path.join(corpus, t + '_coverage'), 'w', encoding='utf-8') as cov_file:
157-
cov_file.write(l)
158-
break
159146

160147

161148
def parse_test_list(makefile):

0 commit comments

Comments
 (0)