Commit b0b6fcb1 authored by Farah Charab's avatar Farah Charab Committed by Commit Bot

Scheduler Fuzzer: Describes the grammar of task queue manager fuzzer.

Describes the grammar of the v0 task queue manager fuzzer input using
a protocol buffer. This grammar describes a test that can test the
following interfaces:
	*  Creating a task queue.
	*  Posting a (delayed) task with a given duration.
	*  Doing the above from within a task.

Bug: 852076

Change-Id: Ie33637eff3d953c814a7c40185d709a6bfc1f791
Reviewed-on: https://chromium-review.googlesource.com/1097327Reviewed-by: default avatarAlex Clarke <alexclarke@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Farah Charab <farahcharab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567229}
parent c441dcc2
......@@ -4,6 +4,7 @@
import("//build/config/jumbo.gni")
import("//third_party/blink/renderer/platform/platform.gni")
import("//third_party/protobuf/proto_library.gni")
blink_platform_sources("scheduler") {
sources = [
......@@ -248,3 +249,9 @@ source_set("perf_tests") {
configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
}
proto_library("task_queue_manager_test_description_proto") {
sources = [
"base/proto/task_queue_manager_test_description.proto",
]
}
syntax = "proto2";
package base.sequence_manager;
// Describes the grammar of the fuzzer's test description. At a high level, it
// describes a sequence of actions that can be executed.
message TaskQueueManagerTestDescription {
// NEXT ID = 2
enum QueuePriority {
// NEXT ID = 6
UNDEFINED = 0;
BEST_EFFORT = 1;
LOW = 2;
NORMAL = 3;
HIGH = 4;
HIGHEST = 5;
}
// Describes interfaces that can be tested by the fuzzer.
// TODO(farahcharab) Add more interfaces here.
message Action {
// NEXT ID = 5
// The number of milliseconds after which an action should be executed
// relative to the start of the program.
optional uint64 delay_ms = 1;
required PostDelayedTaskAction default_action_desc = 2;
oneof description {
CreateTaskQueueAction create_task_queue_desc = 3;
PostDelayedTaskAction post_delayed_task_desc = 4;
}
}
message Task {
// NEXT ID = 3
// If not set, then this is a no-op task.
repeated Action actions = 1;
optional uint64 duration_ms = 2;
}
// Describes the grammar of TaskQueueManager::CreateTaskQueue.
message CreateTaskQueueAction {
// NEXT ID = 2
optional QueuePriority initial_priority = 1;
}
// Describes the grammar of TaskQueue::PostDelayedTask.
message PostDelayedTaskAction {
// NEXT ID = 4
// Used to identify the queue to post to.
required uint64 task_queue_id = 1;
required Task task = 2;
// Delay parameter passed to TaskQueue::PostDelayedTask i.e. the delay is
// measured after executing the PostDelayedTaskAction.
optional uint64 delay_ms = 3;
}
repeated Action actions = 1;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment