mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-19 04:58:09 +00:00
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:
@ -26,6 +26,7 @@ from onefuzztypes import (
|
|||||||
responses,
|
responses,
|
||||||
webhooks,
|
webhooks,
|
||||||
)
|
)
|
||||||
|
from onefuzztypes.enums import TaskType
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from six.moves import input # workaround for static analysis
|
from six.moves import input # workaround for static analysis
|
||||||
|
|
||||||
@ -802,7 +803,7 @@ class Tasks(Endpoint):
|
|||||||
def create(
|
def create(
|
||||||
self,
|
self,
|
||||||
job_id: UUID_EXPANSION,
|
job_id: UUID_EXPANSION,
|
||||||
task_type: enums.TaskType,
|
task_type: TaskType,
|
||||||
target_exe: str,
|
target_exe: str,
|
||||||
containers: List[Tuple[enums.ContainerType, primitives.Container]],
|
containers: List[Tuple[enums.ContainerType, primitives.Container]],
|
||||||
*,
|
*,
|
||||||
@ -852,6 +853,13 @@ class Tasks(Endpoint):
|
|||||||
|
|
||||||
self.logger.debug("creating task: %s", task_type)
|
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_expanded = self._disambiguate_uuid(
|
||||||
"job_id",
|
"job_id",
|
||||||
job_id,
|
job_id,
|
||||||
|
Reference in New Issue
Block a user