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

Commit 852b81a

Browse files
committed
fixup
1 parent 1c3a673 commit 852b81a

File tree

2 files changed

+13
-80
lines changed

2 files changed

+13
-80
lines changed

src/agent/onefuzz-task/src/local/schema.json

Lines changed: 11 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"title": "TaskGroup",
4-
"description": "A group of tasks to run",
4+
"description": "A group of task to run",
55
"type": "object",
66
"required": [
7-
"target_args",
87
"tasks"
98
],
109
"properties": {
@@ -24,90 +23,33 @@
2423
"null"
2524
]
2625
},
27-
"job_id": {
28-
"type": [
29-
"string",
30-
"null"
31-
],
32-
"format": "uuid"
33-
},
3426
"setup_dir": {
3527
"type": [
3628
"string",
3729
"null"
3830
]
3931
},
40-
"target_env": {
41-
"type": "array",
42-
"items": {
43-
"type": "array",
44-
"items": [
45-
{
46-
"type": "string"
47-
},
48-
{
49-
"type": "string"
50-
}
51-
],
52-
"maxItems": 2,
53-
"minItems": 2
54-
}
55-
},
56-
"target_exe": {
57-
"type": [
58-
"string",
59-
"null"
60-
]
61-
},
62-
"target_options": {
63-
"type": "array",
64-
"items": {
65-
"type": "string"
66-
}
67-
},
6832
"tasks": {
6933
"description": "The list of tasks",
7034
"type": "array",
7135
"items": {
7236
"$ref": "#/definitions/TaskConfig"
7337
}
74-
},
75-
"target_args": {
76-
"anyOf": [
77-
{
78-
"$ref": "#/definitions/TargetArgs"
79-
},
80-
{
81-
"type": "null"
82-
}
83-
]
8438
}
8539
},
8640
"definitions": {
87-
"TargetArgs": {
88-
"description": "Required for running a target",
41+
"FolderWatch": {
8942
"type": "object",
43+
"required": [
44+
"path"
45+
],
9046
"properties": {
91-
"target_env": {
92-
"type": "object",
93-
"additionalProperties": {
94-
"type": "string"
95-
}
96-
},
97-
"target_exe": {
47+
"path": {
48+
"description": "The path to watch",
9849
"type": "string"
99-
},
100-
"target_options": {
101-
"type": "array",
102-
"items": {
103-
"type": "string"
104-
}
10550
}
10651
}
10752
},
108-
"FolderWatch": {
109-
"type": "string"
110-
},
11153
"TaskConfig": {
11254
"oneOf": [
11355
{
@@ -269,6 +211,8 @@
269211
{
270212
"type": "object",
271213
"required": [
214+
"coverage",
215+
"input_queue",
272216
"readonly_inputs",
273217
"target_env",
274218
"target_exe",
@@ -280,14 +224,7 @@
280224
"type": "string"
281225
},
282226
"input_queue": {
283-
"anyOf": [
284-
{
285-
"$ref": "#/definitions/FolderWatch"
286-
},
287-
{
288-
"type": "null"
289-
}
290-
]
227+
"$ref": "#/definitions/FolderWatch"
291228
},
292229
"module_allowlist": {
293230
"type": [
@@ -438,4 +375,4 @@
438375
]
439376
}
440377
}
441-
}
378+
}

src/agent/onefuzz-task/src/local/template.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ use tokio::{sync::Mutex, task::JoinHandle};
1414

1515
use crate::tasks::{
1616
config::CommonConfig,
17-
coverage::generic::{
18-
19-
},
2017
fuzz::{
2118
self,
2219
libfuzzer::{common::default_workers, generic::LibFuzzerFuzzTask},
@@ -27,9 +24,9 @@ use crate::tasks::{
2724
use super::common::{DirectoryMonitorQueue, SyncCountDirMonitor, UiEvent};
2825
use anyhow::Result;
2926

30-
use futures::{future::OptionFuture, task};
27+
use futures::future::OptionFuture;
3128

32-
use schemars::{schema_for, JsonSchema};
29+
use schemars::JsonSchema;
3330

3431
/// A group of task to run
3532
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema)]
@@ -396,7 +393,6 @@ pub async fn launch(
396393
}
397394

398395
mod test {
399-
use schemars;
400396
#[test]
401397
fn test() {
402398
let schema = schemars::schema_for!(super::TaskGroup);

0 commit comments

Comments
 (0)