aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-02-08 12:47:30 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-02-08 20:25:02 +0100
commit6a3c415d02bf3c2d68fa964efa6affba3e24f3d8 (patch)
treea2f99a4e93ef3c17ecc3d254eff66ef7522e9366
parentfc9c934ee893341c7a8677f4bd01c1074a7d8f6a (diff)
tools/syz-fillreports: use raw bug IDs
The corresponding dashboard API does not expect ExtIDs, adjust the code accordingly.
-rw-r--r--tools/syz-fillreports/fillreports.go20
1 files changed, 14 insertions, 6 deletions
diff --git a/tools/syz-fillreports/fillreports.go b/tools/syz-fillreports/fillreports.go
index 2c297eb6d..501a9bcfa 100644
--- a/tools/syz-fillreports/fillreports.go
+++ b/tools/syz-fillreports/fillreports.go
@@ -37,11 +37,11 @@ func main() {
}
workItems := loadBugReports(dash, resp.List)
for item := range workItems {
- processReport(dash, item)
+ processReport(dash, item.report, item.bugID)
}
}
-func processReport(dash *dashapi.Dashboard, bugReport *dashapi.BugReport) {
+func processReport(dash *dashapi.Dashboard, bugReport *dashapi.BugReport, bugID string) {
if bugReport.ReportElements != nil && len(bugReport.ReportElements.GuiltyFiles) > 0 {
log.Printf("%v: already has guilty files", bugReport.ID)
return
@@ -85,7 +85,7 @@ func processReport(dash *dashapi.Dashboard, bugReport *dashapi.BugReport) {
return
}
err = dash.UpdateReport(&dashapi.UpdateReportReq{
- BugID: bugReport.ID,
+ BugID: bugID,
CrashID: bugReport.CrashID,
GuiltyFiles: &[]string{rep.GuiltyFile},
})
@@ -95,13 +95,18 @@ func processReport(dash *dashapi.Dashboard, bugReport *dashapi.BugReport) {
log.Printf("%v: updated", bugReport.ID)
}
-func loadBugReports(dash *dashapi.Dashboard, IDs []string) <-chan *dashapi.BugReport {
+type workItem struct {
+ report *dashapi.BugReport
+ bugID string
+}
+
+func loadBugReports(dash *dashapi.Dashboard, IDs []string) <-chan *workItem {
const (
threads = 8
logStep = 100
)
ids := make(chan string)
- ret := make(chan *dashapi.BugReport)
+ ret := make(chan *workItem)
var wg sync.WaitGroup
for i := 0; i < threads; i++ {
wg.Add(1)
@@ -116,7 +121,10 @@ func loadBugReports(dash *dashapi.Dashboard, IDs []string) <-chan *dashapi.BugRe
if resp.ID == "" {
continue
}
- ret <- resp
+ ret <- &workItem{
+ report: resp,
+ bugID: id,
+ }
}
}()
}