mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
add fuzzer_arguments to fuzzer runner
This commit is contained in:
parent
0fc14520c8
commit
3ccc2aed4c
@ -20,6 +20,7 @@ def run_fuzzer(fuzzer: str):
|
||||
|
||||
options_file = f"{fuzzer}.options"
|
||||
custom_libfuzzer_options = ""
|
||||
fuzzer_arguments = ""
|
||||
|
||||
with Path(options_file) as path:
|
||||
if path.exists() and path.is_file():
|
||||
@ -47,6 +48,12 @@ def run_fuzzer(fuzzer: str):
|
||||
for key, value in parser["libfuzzer"].items()
|
||||
)
|
||||
|
||||
if parser.has_section("fuzzer_arguments"):
|
||||
fuzzer_arguments = " ".join(
|
||||
("%s" % key) if value == "" else ("%s=%s" % (key, value))
|
||||
for key, value in parser["fuzzer_arguments"].items()
|
||||
)
|
||||
|
||||
cmd_line = f"{DEBUGGER} ./{fuzzer} {FUZZER_ARGS} {corpus_dir}"
|
||||
if custom_libfuzzer_options:
|
||||
cmd_line += f" {custom_libfuzzer_options}"
|
||||
|
4
tests/fuzz/tcp_protocol_fuzzer.options
Normal file
4
tests/fuzz/tcp_protocol_fuzzer.options
Normal file
@ -0,0 +1,4 @@
|
||||
[fuzzer_arguments]
|
||||
--log-file=tcp_protocol_fuzzer.log
|
||||
--=
|
||||
--logging.terminal=0
|
Loading…
Reference in New Issue
Block a user