From dfbcd988bf48a16945a9181a013e0182897d65a3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 14 Oct 2024 17:14:12 +0200 Subject: dashboard/api: add "Link" to link fields --- dashboard/api/api.go | 8 ++++---- dashboard/app/public_json_api.go | 8 ++++---- tools/syz-reprolist/reprolist.go | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dashboard/api/api.go b/dashboard/api/api.go index 36c61b040..ec5e5a508 100644 --- a/dashboard/api/api.go +++ b/dashboard/api/api.go @@ -30,16 +30,16 @@ type Bug struct { type Crash struct { Title string `json:"title"` - SyzReproducer string `json:"syz-reproducer,omitempty"` - CReproducer string `json:"c-reproducer,omitempty"` - KernelConfig string `json:"kernel-config,omitempty"` + SyzReproducerLink string `json:"syz-reproducer,omitempty"` + CReproducerLink string `json:"c-reproducer,omitempty"` + KernelConfigLink string `json:"kernel-config,omitempty"` KernelSourceGit string `json:"kernel-source-git,omitempty"` KernelSourceCommit string `json:"kernel-source-commit,omitempty"` SyzkallerGit string `json:"syzkaller-git,omitempty"` SyzkallerCommit string `json:"syzkaller-commit,omitempty"` CompilerDescription string `json:"compiler-description,omitempty"` Architecture string `json:"architecture,omitempty"` - CrashReport string `json:"crash-report-link,omitempty"` + CrashReportLink string `json:"crash-report-link,omitempty"` } type Commit struct { diff --git a/dashboard/app/public_json_api.go b/dashboard/app/public_json_api.go index 62faefef0..05d0de441 100644 --- a/dashboard/app/public_json_api.go +++ b/dashboard/app/public_json_api.go @@ -38,16 +38,16 @@ func getExtAPIDescrForBugPage(bugPage *uiBugPage) *api.Bug { for _, crash := range bugPage.Crashes.Crashes { res = append(res, api.Crash{ Title: crash.Title, - SyzReproducer: crash.ReproSyzLink, - CReproducer: crash.ReproCLink, - KernelConfig: crash.KernelConfigLink, + SyzReproducerLink: crash.ReproSyzLink, + CReproducerLink: crash.ReproCLink, + KernelConfigLink: crash.KernelConfigLink, KernelSourceGit: crash.KernelCommitLink, KernelSourceCommit: crash.KernelCommit, SyzkallerGit: crash.SyzkallerCommitLink, SyzkallerCommit: crash.SyzkallerCommit, // TODO: add the CompilerDescription // TODO: add the Architecture - CrashReport: crash.ReportLink, + CrashReportLink: crash.ReportLink, }) } return res diff --git a/tools/syz-reprolist/reprolist.go b/tools/syz-reprolist/reprolist.go index ada367baa..34a3cefb9 100644 --- a/tools/syz-reprolist/reprolist.go +++ b/tools/syz-reprolist/reprolist.go @@ -311,7 +311,8 @@ func exportNamespace() error { if err != nil { return fmt.Errorf("makeBugDetails: %w", err) } - if cReproURL := bugDetails.Crashes[0].CReproducer; cReproURL != "" { // export max 1 CRepro per bug + // Export max 1 CRepro per bug. + if cReproURL := bugDetails.Crashes[0].CReproducerLink; cReproURL != "" { reproID := reproIDFromURL(cReproURL) fmt.Printf("[%d](%d/%d)saving c-repro %s for bug %s\n", i, iBug, len(bugURLs), reproID, bugDetails.ID) -- cgit mrf-deployment