Skip to content

Commit 6590395

Browse files
tests: Remove FUZZERS_MISSING_CORPORA
1 parent 815c7a6 commit 6590395

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

test/fuzz/test_runner.py

+15-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
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-
"netaddress",
18-
]
19-
2015

2116
def main():
2217
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
@@ -95,6 +90,20 @@ def main():
9590

9691
logging.info("{} of {} detected fuzz target(s) selected: {}".format(len(test_list_selection), len(test_list_all), " ".join(test_list_selection)))
9792

93+
test_list_seedless = []
94+
for t in test_list_selection:
95+
corpus_path = os.path.join(args.seed_dir, t)
96+
if not os.path.exists(corpus_path) or len(os.listdir(corpus_path)) == 0:
97+
test_list_seedless.append(t)
98+
test_list_seedless.sort()
99+
if test_list_seedless:
100+
logging.info(
101+
"Fuzzing harnesses lacking a seed corpus: {}".format(
102+
" ".join(test_list_seedless)
103+
)
104+
)
105+
logging.info("Please consider adding a fuzz seed corpus at https://github.com/bitcoin-core/qa-assets")
106+
98107
try:
99108
help_output = subprocess.run(
100109
args=[
@@ -125,8 +134,7 @@ def main():
125134
def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
126135
for t in test_list:
127136
corpus_path = os.path.join(corpus, t)
128-
if t in FUZZERS_MISSING_CORPORA:
129-
os.makedirs(corpus_path, exist_ok=True)
137+
os.makedirs(corpus_path, exist_ok=True)
130138
args = [
131139
os.path.join(build_dir, 'src', 'test', 'fuzz', t),
132140
'-runs=1',

0 commit comments

Comments
 (0)