Skip to content

Commit 16f0a18

Browse files
tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus
1 parent ae69436 commit 16f0a18

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

test/fuzz/test_runner.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,28 @@
1212
import subprocess
1313
import logging
1414

15+
# Fuzzers known to lack a seed corpus in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus
16+
FUZZERS_MISSING_CORPORA = [
17+
"addr_info_deserialize",
18+
"block_file_info_deserialize",
19+
"block_filter_deserialize",
20+
"block_header_and_short_txids_deserialize",
21+
"fee_rate_deserialize",
22+
"flat_file_pos_deserialize",
23+
"key_origin_info_deserialize",
24+
"merkle_block_deserialize",
25+
"mutable_transaction_deserialize",
26+
"out_point_deserialize",
27+
"partial_merkle_tree_deserialize",
28+
"partially_signed_transaction_deserialize",
29+
"prefilled_transaction_deserialize",
30+
"psbt_input_deserialize",
31+
"psbt_output_deserialize",
32+
"pub_key_deserialize",
33+
"script_deserialize",
34+
"sub_net_deserialize",
35+
"tx_in_deserialize",
36+
]
1537

1638
def main():
1739
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
@@ -100,10 +122,14 @@ def main():
100122

101123
def run_once(*, corpus, test_list, build_dir, export_coverage):
102124
for t in test_list:
125+
corpus_path = os.path.join(corpus, t)
126+
if t in FUZZERS_MISSING_CORPORA:
127+
os.makedirs(corpus_path, exist_ok=True)
103128
args = [
104129
os.path.join(build_dir, 'src', 'test', 'fuzz', t),
105130
'-runs=1',
106-
os.path.join(corpus, t),
131+
'-detect_leaks=0',
132+
corpus_path,
107133
]
108134
logging.debug('Run {} with args {}'.format(t, args))
109135
result = subprocess.run(args, stderr=subprocess.PIPE, universal_newlines=True)

0 commit comments

Comments
 (0)