mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-27 01:11:59 +02:00
Merge bitcoin/bitcoin#32388: fuzz: Remove unused TimeoutExpired catch in fuzz runner
fa4804009ceba96926edd7f55ea22442ebdc665d fuzz: Remove unused TimeoutExpired catch in fuzz runner (MarcoFalke) Pull request description: Currently, the way to check for libFuzzer is to search the stderr of the fuzz executable when passed `-help=1` for the string `libFuzzer`. See also14b8dfb2bd/contrib/devtools/deterministic-fuzz-coverage/src/main.rs (L90-L101)
The python test runner additionally includes a timeout catch, which was needed before the plain `read_file` fallback was implemented, see14b8dfb2bd/src/test/fuzz/fuzz.cpp (L251)
. However, it is no longer needed and the printed error message would be wrong, so remove it. (side-note: On Windows the fuzz executable seems to time out when an assert is hit in a debug build, see https://github.com/bitcoin/bitcoin/issues/32341#issuecomment-2842716175. However, no one is running fuzz debug on Windows. Also, the newly added debug logging is a preferable replacement in this case anyway.) ACKs for top commit: kevkevinpal: crACK [fa48040](fa4804009c
) Crypt-iQ: crACK fa4804009ceba96926edd7f55ea22442ebdc665d marcofleon: crACK fa4804009ceba96926edd7f55ea22442ebdc665d brunoerg: code review ACK fa4804009ceba96926edd7f55ea22442ebdc665d Tree-SHA512: 64f5e3862fece9ab2b6592615b72b81e9c087dcd394b1d062a96df0d88d8b5999674f0faa1165a5998c05289c1874e29311d7b24d84fee9bc6c46d1662d29e4d
This commit is contained in:
commit
6d5edfcc58
@ -151,24 +151,21 @@ def main():
|
||||
)
|
||||
logging.info("Please consider adding a fuzz corpus at https://github.com/bitcoin-core/qa-assets")
|
||||
|
||||
try:
|
||||
help_output = subprocess.run(
|
||||
args=[
|
||||
fuzz_bin,
|
||||
'-help=1',
|
||||
],
|
||||
env=get_fuzz_env(target=test_list_selection[0], source_dir=config['environment']['SRCDIR']),
|
||||
timeout=20,
|
||||
check=False,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
).stderr
|
||||
using_libfuzzer = "libFuzzer" in help_output
|
||||
if (args.generate or args.m_dir) and not using_libfuzzer:
|
||||
logging.error("Must be built with libFuzzer")
|
||||
sys.exit(1)
|
||||
except subprocess.TimeoutExpired:
|
||||
logging.error("subprocess timed out: Currently only libFuzzer is supported")
|
||||
print("Check if using libFuzzer ... ", end='')
|
||||
help_output = subprocess.run(
|
||||
args=[
|
||||
fuzz_bin,
|
||||
'-help=1',
|
||||
],
|
||||
env=get_fuzz_env(target=test_list_selection[0], source_dir=config['environment']['SRCDIR']),
|
||||
check=False,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
).stderr
|
||||
using_libfuzzer = "libFuzzer" in help_output
|
||||
print(using_libfuzzer)
|
||||
if (args.generate or args.m_dir) and not using_libfuzzer:
|
||||
logging.error("Must be built with libFuzzer")
|
||||
sys.exit(1)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=args.par) as fuzz_pool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user