aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/dashapi/dashapi.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-11-10 14:02:34 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-11-16 13:09:50 +0300
commite928bb6b8a3a7261b837f743d9068f211ae51a63 (patch)
tree679e18be1143f710c0aa7c9474764a6dbb1d9f48 /dashboard/dashapi/dashapi.go
parent708390a0397ba4225c73c021216f25edfd62dd53 (diff)
dashboard/app: test fix patches by request
Add initial support for testing fix patches. A user on mailing list can request patch testing with: and attach a patch.
Diffstat (limited to 'dashboard/dashapi/dashapi.go')
-rw-r--r--dashboard/dashapi/dashapi.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go
index 28a4f7bf8..7051e3f2e 100644
--- a/dashboard/dashapi/dashapi.go
+++ b/dashboard/dashapi/dashapi.go
@@ -75,6 +75,52 @@ func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error) {
return resp, err
}
+// Jobs workflow:
+// - syz-ci sends JobPollReq periodically to check for new jobs,
+// request contains list of managers that this syz-ci runs.
+// - dashboard replies with JobPollResp that contains job details,
+// if no new jobs available ID is set to empty string.
+// - when syz-ci finishes the job, it sends JobDoneReq which contains
+// job execution result (Build, Crash or Error details),
+// ID must match JobPollResp.ID.
+
+type JobPollReq struct {
+ Managers []string
+}
+
+type JobPollResp struct {
+ ID string
+ Manager string
+ KernelRepo string
+ KernelBranch string
+ KernelConfig []byte
+ SyzkallerCommit string
+ Patch []byte
+ ReproOpts []byte
+ ReproSyz []byte
+ ReproC []byte
+}
+
+type JobDoneReq struct {
+ ID string
+ Build Build
+ Error []byte
+ CrashTitle string
+ CrashLog []byte
+ CrashReport []byte
+}
+
+func (dash *Dashboard) JobPoll(managers []string) (*JobPollResp, error) {
+ req := &JobPollReq{Managers: managers}
+ resp := new(JobPollResp)
+ err := dash.query("job_poll", req, resp)
+ return resp, err
+}
+
+func (dash *Dashboard) JobDone(req *JobDoneReq) error {
+ return dash.query("job_done", req, nil)
+}
+
// Crash describes a single kernel crash (potentially with repro).
type Crash struct {
BuildID string // refers to Build.ID
@@ -140,6 +186,7 @@ type BugReport struct {
Namespace string
Config []byte
ID string
+ JobID string
ExtID string // arbitrary reporting ID forwarded from BugUpdate.ExtID
First bool // Set for first report for this bug.
Title string
@@ -157,6 +204,10 @@ type BugReport struct {
Report []byte
ReproC []byte
ReproSyz []byte
+
+ CrashTitle string // job execution crash title
+ Error []byte // job execution error
+ Patch []byte // testing job patch
}
type BugUpdate struct {