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

Commit

Permalink
Allow the duration of the tasks to be specified in the template (#2997)
Browse files Browse the repository at this point in the history
  • Loading branch information
chkeita authored Apr 10, 2023
1 parent 4195fc8 commit 35e9eff
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/cli/onefuzz/templates/libfuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def basic(
inputs: Optional[Directory] = None,
reboot_after_setup: bool = False,
duration: int = 24,
task_duration: Optional[int] = None,
target_workers: Optional[int] = None,
target_options: Optional[List[str]] = None,
fuzzing_target_options: Optional[List[str]] = None,
Expand Down Expand Up @@ -458,7 +459,7 @@ def basic(
target_exe=target_exe_blob_name,
vm_count=vm_count,
reboot_after_setup=reboot_after_setup,
duration=duration,
duration=task_duration if task_duration else duration,
target_workers=target_workers,
target_options=target_options,
fuzzing_target_options=fuzzing_target_options,
Expand Down Expand Up @@ -625,6 +626,7 @@ def dotnet(
inputs: Optional[Directory] = None,
reboot_after_setup: bool = False,
duration: int = 24,
task_duration: Optional[int] = None,
target_workers: Optional[int] = None,
fuzzing_target_options: Optional[List[str]] = None,
target_env: Optional[Dict[str, str]] = None,
Expand Down Expand Up @@ -744,7 +746,7 @@ def dotnet(
fuzzer_containers,
pool_name=pool_name,
reboot_after_setup=reboot_after_setup,
duration=duration,
duration=task_duration if task_duration else duration,
vm_count=vm_count,
target_options=fuzzing_target_options,
target_env=target_env,
Expand Down Expand Up @@ -792,7 +794,7 @@ def dotnet(
libfuzzer_dotnet_loader_dll,
coverage_containers,
pool_name=pool_name,
duration=duration,
duration=task_duration if task_duration else duration,
vm_count=1,
reboot_after_setup=reboot_after_setup,
target_options=sharpfuzz_harness_target_options,
Expand Down Expand Up @@ -823,7 +825,7 @@ def dotnet(
libfuzzer_dotnet_loader_dll,
report_containers,
pool_name=pool_name,
duration=duration,
duration=task_duration if task_duration else duration,
vm_count=1,
reboot_after_setup=reboot_after_setup,
target_options=sharpfuzz_harness_target_options,
Expand Down Expand Up @@ -854,6 +856,7 @@ def qemu_user(
inputs: Optional[Directory] = None,
reboot_after_setup: bool = False,
duration: int = 24,
task_duration: Optional[int] = None,
target_workers: Optional[int] = 1,
target_options: Optional[List[str]] = None,
fuzzing_target_options: Optional[List[str]] = None,
Expand Down Expand Up @@ -1005,7 +1008,7 @@ def qemu_user(
fuzzer_containers,
pool_name=pool_name,
reboot_after_setup=reboot_after_setup,
duration=duration,
duration=task_duration if task_duration else duration,
vm_count=vm_count,
target_options=libfuzzer_fuzz_target_options,
target_env=target_env,
Expand Down Expand Up @@ -1038,7 +1041,7 @@ def qemu_user(
wrapper_name,
report_containers,
pool_name=pool_name,
duration=duration,
duration=task_duration if task_duration else duration,
vm_count=1,
reboot_after_setup=reboot_after_setup,
target_options=target_options,
Expand Down

0 comments on commit 35e9eff

Please sign in to comment.