Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions infra/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def prepare_aarch64_emulation():
subprocess.check_call(['docker', 'buildx', 'use', ARM_BUILDER_NAME])


def docker_run(run_args, print_output=True, architecture='x86_64'):
def docker_run(run_args, *, print_output=True, architecture='x86_64'):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to ensure that we don't pass mismatching arguments like we did below.

"""Calls `docker run`."""
platform = 'linux/arm64' if architecture == 'aarch64' else 'linux/amd64'
command = [
Expand Down Expand Up @@ -1612,7 +1612,7 @@ def fuzzbench_measure(args):
f'gcr.io/oss-fuzz/{args.project.name}', 'fuzzbench_measure'
]

return docker_run(run_args, 'x86_64')
return docker_run(run_args, architecture='x86_64')


def reproduce(args):
Expand All @@ -1631,14 +1631,13 @@ def reproduce_impl( # pylint: disable=too-many-arguments
testcase_path,
args,
architecture='x86_64',
run_function=docker_run,
err_result=False):
run_function=docker_run):
"""Reproduces a specific test case."""
if not check_project_exists(project):
return err_result
return False

if not _check_fuzzer_exists(project, fuzzer_name, args, architecture):
return err_result
return False

debugger = ''
env = ['HELPER=True', 'ARCHITECTURE=' + architecture]
Expand All @@ -1665,6 +1664,7 @@ def reproduce_impl( # pylint: disable=too-many-arguments
fuzzer_name,
'-runs=100',
] + fuzzer_args

return run_function(run_args, architecture=architecture)


Expand Down
Loading