|
12 | 12 | import subprocess
|
13 | 13 | import logging
|
14 | 14 |
|
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 |
| - |
20 | 15 |
|
21 | 16 | def main():
|
22 | 17 | parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
@@ -95,6 +90,20 @@ def main():
|
95 | 90 |
|
96 | 91 | logging.info("{} of {} detected fuzz target(s) selected: {}".format(len(test_list_selection), len(test_list_all), " ".join(test_list_selection)))
|
97 | 92 |
|
| 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 | + |
98 | 107 | try:
|
99 | 108 | help_output = subprocess.run(
|
100 | 109 | args=[
|
@@ -125,8 +134,7 @@ def main():
|
125 | 134 | def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
|
126 | 135 | for t in test_list:
|
127 | 136 | 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) |
130 | 138 | args = [
|
131 | 139 | os.path.join(build_dir, 'src', 'test', 'fuzz', t),
|
132 | 140 | '-runs=1',
|
|
0 commit comments