Allow use of readonly_inputs for qemu_user template (#3116)

* Allow use of readonly_inputs for qemu_user template

* formatting fix
This commit is contained in:
George Pollard 2023-05-19 12:33:49 +12:00 committed by GitHub
parent dc66164cda
commit 5048e6d50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -897,6 +897,7 @@ class Libfuzzer(Command):
no_check_fuzzer_help: bool = False,
extra_container: Optional[Container] = None,
crashes: Optional[Container] = None,
readonly_inputs: Optional[Container] = None,
) -> Optional[Job]:
"""
libfuzzer tasks, wrapped via qemu-user (PREVIEW FEATURE)
@ -950,7 +951,7 @@ class Libfuzzer(Command):
)
if existing_inputs:
self.onefuzz.containers.get(existing_inputs)
self.onefuzz.containers.get(existing_inputs) # ensure it exists
helper.containers[ContainerType.inputs] = existing_inputs
else:
helper.define_containers(ContainerType.inputs)
@ -968,6 +969,10 @@ class Libfuzzer(Command):
if extra_container is not None:
fuzzer_containers.append((ContainerType.extra, extra_container))
if readonly_inputs is not None:
self.onefuzz.containers.get(readonly_inputs) # ensure it exists
fuzzer_containers.append((ContainerType.readonly_inputs, readonly_inputs))
helper.create_containers()
target_exe_blob_name = helper.setup_relative_blob_name(target_exe, None)