mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-18 04:38:09 +00:00
Change --check_fuzzer_help
to --no_check_fuzzer_help
(#3063)
Because `--check_fuzzer_help` is a positive flag (defaults to `True`), there is no way to change it to `False`, because specifying it on the command line sets it to `True`. Change the flag to a negative one instead, named `--no_check_fuzzer_help`.
This commit is contained in:
@ -65,7 +65,8 @@ class Libfuzzer(Command):
|
||||
ensemble_sync_delay: Optional[int] = None,
|
||||
colocate_all_tasks: bool = False,
|
||||
colocate_secondary_tasks: bool = True,
|
||||
check_fuzzer_help: bool = True,
|
||||
check_fuzzer_help: bool = False,
|
||||
no_check_fuzzer_help: bool = False,
|
||||
expect_crash_on_failure: bool = False,
|
||||
minimized_stack_depth: Optional[int] = None,
|
||||
module_allowlist: Optional[str] = None,
|
||||
@ -75,6 +76,13 @@ class Libfuzzer(Command):
|
||||
analyzer_env: Optional[Dict[str, str]] = None,
|
||||
tools: Optional[Container] = None,
|
||||
) -> None:
|
||||
if check_fuzzer_help:
|
||||
self.logger.warning(
|
||||
"--check_fuzzer_help is the default and does not need to be set; this parameter will be removed in a future version"
|
||||
)
|
||||
check_fuzzer_help = not no_check_fuzzer_help
|
||||
del no_check_fuzzer_help
|
||||
|
||||
target_options = target_options or []
|
||||
|
||||
regression_containers = [
|
||||
@ -348,7 +356,8 @@ class Libfuzzer(Command):
|
||||
ensemble_sync_delay: Optional[int] = None,
|
||||
colocate_all_tasks: bool = False,
|
||||
colocate_secondary_tasks: bool = True,
|
||||
check_fuzzer_help: bool = True,
|
||||
check_fuzzer_help: bool = False,
|
||||
no_check_fuzzer_help: bool = False,
|
||||
expect_crash_on_failure: bool = False,
|
||||
minimized_stack_depth: Optional[int] = None,
|
||||
module_allowlist: Optional[File] = None,
|
||||
@ -367,6 +376,13 @@ class Libfuzzer(Command):
|
||||
syncing inputs during ensemble fuzzing (0 to disable).
|
||||
"""
|
||||
|
||||
if check_fuzzer_help:
|
||||
self.logger.warning(
|
||||
"--check_fuzzer_help is the default and does not need to be set; this parameter will be removed in a future version"
|
||||
)
|
||||
check_fuzzer_help = not no_check_fuzzer_help
|
||||
del no_check_fuzzer_help
|
||||
|
||||
# verify containers exist
|
||||
if existing_inputs:
|
||||
self.onefuzz.containers.get(existing_inputs)
|
||||
@ -512,12 +528,19 @@ class Libfuzzer(Command):
|
||||
notification_config: Optional[NotificationConfig] = None,
|
||||
debug: Optional[List[TaskDebugFlag]] = None,
|
||||
preserve_existing_outputs: bool = False,
|
||||
check_fuzzer_help: bool = True,
|
||||
check_fuzzer_help: bool = False,
|
||||
no_check_fuzzer_help: bool = False,
|
||||
extra_container: Optional[Container] = None,
|
||||
) -> Optional[Job]:
|
||||
"""
|
||||
libfuzzer merge task
|
||||
"""
|
||||
if check_fuzzer_help:
|
||||
self.logger.warning(
|
||||
"--check_fuzzer_help is the default and does not need to be set; this parameter will be removed in a future version"
|
||||
)
|
||||
check_fuzzer_help = not no_check_fuzzer_help
|
||||
del no_check_fuzzer_help
|
||||
|
||||
# verify containers exist
|
||||
if existing_inputs:
|
||||
@ -870,13 +893,20 @@ class Libfuzzer(Command):
|
||||
colocate_all_tasks: bool = False,
|
||||
crash_report_timeout: Optional[int] = 1,
|
||||
check_retry_count: Optional[int] = 300,
|
||||
check_fuzzer_help: bool = True,
|
||||
check_fuzzer_help: bool = False,
|
||||
no_check_fuzzer_help: bool = False,
|
||||
extra_container: Optional[Container] = None,
|
||||
crashes: Optional[Container] = None,
|
||||
) -> Optional[Job]:
|
||||
"""
|
||||
libfuzzer tasks, wrapped via qemu-user (PREVIEW FEATURE)
|
||||
"""
|
||||
if check_fuzzer_help:
|
||||
self.logger.warning(
|
||||
"--check_fuzzer_help is the default and does not need to be set; this parameter will be removed in a future version"
|
||||
)
|
||||
check_fuzzer_help = not no_check_fuzzer_help
|
||||
del no_check_fuzzer_help
|
||||
|
||||
self.logger.warning(
|
||||
"qemu_user jobs are a preview feature and may change in the future"
|
||||
|
Reference in New Issue
Block a user