Warn on SDK/CLI creation of libfuzzer_coverage task (#1944)

The old `libfuzzer_coverage` task dumps binary sancov tables. Its output is not usable on its own. This task has been superseded by the generic `coverage` task (which produces actual modoffset and source line coverage).

Add a CLI warning if it is used, in preparation for removing it.
This commit is contained in:
Joe Ranweiler
2022-05-14 12:03:09 -07:00
committed by GitHub
parent b3e7f9b6cf
commit 806409bdbf

View File

@ -26,6 +26,7 @@ from onefuzztypes import (
responses,
webhooks,
)
from onefuzztypes.enums import TaskType
from pydantic import BaseModel
from six.moves import input # workaround for static analysis
@ -802,7 +803,7 @@ class Tasks(Endpoint):
def create(
self,
job_id: UUID_EXPANSION,
task_type: enums.TaskType,
task_type: TaskType,
target_exe: str,
containers: List[Tuple[enums.ContainerType, primitives.Container]],
*,
@ -852,6 +853,13 @@ class Tasks(Endpoint):
self.logger.debug("creating task: %s", task_type)
if task_type == TaskType.libfuzzer_coverage:
self.logger.warning(
"DEPRECATED: the `libfuzzer_coverage` task type is deprecated. "
"It will be removed in an upcoming release. "
"Please migrate to the `coverage` task type."
)
job_id_expanded = self._disambiguate_uuid(
"job_id",
job_id,