mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-12 10:08:09 +00:00
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:
@ -897,6 +897,7 @@ class Libfuzzer(Command):
|
|||||||
no_check_fuzzer_help: bool = False,
|
no_check_fuzzer_help: bool = False,
|
||||||
extra_container: Optional[Container] = None,
|
extra_container: Optional[Container] = None,
|
||||||
crashes: Optional[Container] = None,
|
crashes: Optional[Container] = None,
|
||||||
|
readonly_inputs: Optional[Container] = None,
|
||||||
) -> Optional[Job]:
|
) -> Optional[Job]:
|
||||||
"""
|
"""
|
||||||
libfuzzer tasks, wrapped via qemu-user (PREVIEW FEATURE)
|
libfuzzer tasks, wrapped via qemu-user (PREVIEW FEATURE)
|
||||||
@ -950,7 +951,7 @@ class Libfuzzer(Command):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if existing_inputs:
|
if existing_inputs:
|
||||||
self.onefuzz.containers.get(existing_inputs)
|
self.onefuzz.containers.get(existing_inputs) # ensure it exists
|
||||||
helper.containers[ContainerType.inputs] = existing_inputs
|
helper.containers[ContainerType.inputs] = existing_inputs
|
||||||
else:
|
else:
|
||||||
helper.define_containers(ContainerType.inputs)
|
helper.define_containers(ContainerType.inputs)
|
||||||
@ -968,6 +969,10 @@ class Libfuzzer(Command):
|
|||||||
if extra_container is not None:
|
if extra_container is not None:
|
||||||
fuzzer_containers.append((ContainerType.extra, extra_container))
|
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()
|
helper.create_containers()
|
||||||
|
|
||||||
target_exe_blob_name = helper.setup_relative_blob_name(target_exe, None)
|
target_exe_blob_name = helper.setup_relative_blob_name(target_exe, None)
|
||||||
|
Reference in New Issue
Block a user