Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
making libfuzzer_merge not conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
chkeita committed Nov 2, 2020
1 parent b47ec87 commit 4450dde
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions src/cli/onefuzz/templates/libfuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def _create_tasks(
crash_report_timeout: Optional[int] = None,
debug: Optional[List[TaskDebugFlag]] = None,
ensemble_sync_delay: Optional[int] = None,
merge: bool = False,
) -> None:

fuzzer_containers = [
Expand Down Expand Up @@ -128,31 +127,30 @@ def _create_tasks(
debug=debug,
)

if merge:
merge_containers = [
(ContainerType.setup, containers[ContainerType.setup]),
(ContainerType.unique_inputs, containers[ContainerType.unique_inputs]),
(ContainerType.inputs, containers[ContainerType.inputs]),
]

self.logger.info("creating libfuzzer_merge task")
self.onefuzz.tasks.create(
job.job_id,
TaskType.libfuzzer_merge,
target_exe,
merge_containers,
pool_name=pool_name,
duration=duration,
vm_count=1,
reboot_after_setup=reboot_after_setup,
target_options=target_options,
target_env=target_env,
tags=tags,
prereq_tasks=[fuzzer_task.task_id],
target_timeout=crash_report_timeout,
check_retry_count=check_retry_count,
debug=debug,
)
merge_containers = [
(ContainerType.setup, containers[ContainerType.setup]),
(ContainerType.unique_inputs, containers[ContainerType.unique_inputs]),
(ContainerType.inputs, containers[ContainerType.inputs]),
]

self.logger.info("creating libfuzzer_merge task")
self.onefuzz.tasks.create(
job.job_id,
TaskType.libfuzzer_merge,
target_exe,
merge_containers,
pool_name=pool_name,
duration=duration,
vm_count=1,
reboot_after_setup=reboot_after_setup,
target_options=target_options,
target_env=target_env,
tags=tags,
prereq_tasks=[fuzzer_task.task_id],
target_timeout=crash_report_timeout,
check_retry_count=check_retry_count,
debug=debug,
)

def basic(
self,
Expand Down Expand Up @@ -181,7 +179,6 @@ def basic(
notification_config: Optional[NotificationConfig] = None,
debug: Optional[List[TaskDebugFlag]] = None,
ensemble_sync_delay: Optional[int] = None,
merge: bool = False,
) -> Optional[Job]:
"""
Basic libfuzzer job
Expand Down Expand Up @@ -256,7 +253,6 @@ def basic(
check_retry_count=check_retry_count,
debug=debug,
ensemble_sync_delay=ensemble_sync_delay,
merge=merge,
)

self.logger.info("done creating tasks")
Expand Down

0 comments on commit 4450dde

Please sign in to comment.