Skip to content

Commit

Permalink
add randoms_config_filepath to scripts/run_fuzzer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeriann committed Sep 25, 2024
1 parent 1430522 commit 3d395fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/run_fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
perform_checks = False
elif param.startswith('--enable_verification'):
verification = param.replace('--enable_verification=', '').lower() == 'true'
elif param.startswith('--randoms_config_filepath'):
randoms_config_filepath = param.replace('--randoms_config_filepath=', '')
elif param.startswith('--shell='):
shell = param.replace('--shell=', '')
elif param.startswith('--seed='):
Expand Down Expand Up @@ -76,7 +78,8 @@ def run_fuzzer_script(fuzzer):
if fuzzer == 'sqlsmith':
return "call sqlsmith(max_queries=${MAX_QUERIES}, seed=${SEED}, verbose_output=1, log='${LAST_LOG_FILE}', complete_log='${COMPLETE_LOG_FILE}');"
elif fuzzer == 'duckfuzz':
return "call fuzzyduck(max_queries=${MAX_QUERIES}, seed=${SEED}, verbose_output=1, log='${LAST_LOG_FILE}', complete_log='${COMPLETE_LOG_FILE}', enable_verification='${ENABLE_VERIFICATION}');"
return "call fuzzyduck(max_queries=${MAX_QUERIES}, seed=${SEED}, verbose_output=1, log='${LAST_LOG_FILE}', complete_log='${COMPLETE_LOG_FILE}', \
enable_verification='${ENABLE_VERIFICATION}', randoms_config_filepath='${RANDOMS_CONFIG_FILEPATH});"
elif fuzzer == 'duckfuzz_functions':
return "call fuzz_all_functions(seed=${SEED}, verbose_output=1, log='${LAST_LOG_FILE}', complete_log='${COMPLETE_LOG_FILE}');"
else:
Expand Down Expand Up @@ -132,6 +135,7 @@ def run_shell_command(cmd):
.replace('${COMPLETE_LOG_FILE}', complete_log_file)
.replace('${SEED}', str(seed))
.replace('${ENABLE_VERIFICATION}', str(verification))
.replace('${RANDOMS_CONFIG_FILEPATH}', randoms_config_filepath)
)

print(load_script)
Expand Down

0 comments on commit 3d395fd

Please sign in to comment.