mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
tests: Remove FUZZERS_MISSING_CORPORA
This commit is contained in:
parent
815c7a6793
commit
6590395f60
1 changed files with 15 additions and 7 deletions
|
@ -12,11 +12,6 @@ import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
# Fuzzers known to lack a seed corpus in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus
|
|
||||||
FUZZERS_MISSING_CORPORA = [
|
|
||||||
"netaddress",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
|
@ -95,6 +90,20 @@ def main():
|
||||||
|
|
||||||
logging.info("{} of {} detected fuzz target(s) selected: {}".format(len(test_list_selection), len(test_list_all), " ".join(test_list_selection)))
|
logging.info("{} of {} detected fuzz target(s) selected: {}".format(len(test_list_selection), len(test_list_all), " ".join(test_list_selection)))
|
||||||
|
|
||||||
|
test_list_seedless = []
|
||||||
|
for t in test_list_selection:
|
||||||
|
corpus_path = os.path.join(args.seed_dir, t)
|
||||||
|
if not os.path.exists(corpus_path) or len(os.listdir(corpus_path)) == 0:
|
||||||
|
test_list_seedless.append(t)
|
||||||
|
test_list_seedless.sort()
|
||||||
|
if test_list_seedless:
|
||||||
|
logging.info(
|
||||||
|
"Fuzzing harnesses lacking a seed corpus: {}".format(
|
||||||
|
" ".join(test_list_seedless)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
logging.info("Please consider adding a fuzz seed corpus at https://github.com/bitcoin-core/qa-assets")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
help_output = subprocess.run(
|
help_output = subprocess.run(
|
||||||
args=[
|
args=[
|
||||||
|
@ -125,7 +134,6 @@ def main():
|
||||||
def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
|
def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
|
||||||
for t in test_list:
|
for t in test_list:
|
||||||
corpus_path = os.path.join(corpus, t)
|
corpus_path = os.path.join(corpus, t)
|
||||||
if t in FUZZERS_MISSING_CORPORA:
|
|
||||||
os.makedirs(corpus_path, exist_ok=True)
|
os.makedirs(corpus_path, exist_ok=True)
|
||||||
args = [
|
args = [
|
||||||
os.path.join(build_dir, 'src', 'test', 'fuzz', t),
|
os.path.join(build_dir, 'src', 'test', 'fuzz', t),
|
||||||
|
|
Loading…
Add table
Reference in a new issue