From 72c2392eb8cf0b8eba97cdd94331a2ad5bebacdb Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 26 Oct 2023 14:18:21 +0200 Subject: dashboard/app: export ReportLink as a json --- dashboard/app/getjson_test.go | 12 ++++++++---- dashboard/app/public_json_api.go | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dashboard/app/getjson_test.go b/dashboard/app/getjson_test.go index 113053e26..03ad24682 100644 --- a/dashboard/app/getjson_test.go +++ b/dashboard/app/getjson_test.go @@ -21,7 +21,8 @@ func TestJSONAPIIntegration(t *testing.T) { "kernel-config": "/text?tag=KernelConfig\u0026x=a989f27ebc47e2dc", "kernel-source-commit": "1111111111111111111111111111111111111111", "syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1", - "syzkaller-commit": "syzkaller_commit1" + "syzkaller-commit": "syzkaller_commit1", + "crash-report-link": "/text?tag=CrashReport\u0026x=12000000000000" } ] }`, @@ -39,7 +40,8 @@ func TestJSONAPIIntegration(t *testing.T) { "kernel-config": "/text?tag=KernelConfig\u0026x=a989f27ebc47e2dc", "kernel-source-commit": "1111111111111111111111111111111111111111", "syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1", - "syzkaller-commit": "syzkaller_commit1" + "syzkaller-commit": "syzkaller_commit1", + "crash-report-link": "/text?tag=CrashReport\u0026x=15000000000000" } ] }`, @@ -151,7 +153,8 @@ func TestJSONAPIFixCommits(t *testing.T) { "kernel-config": "/text?tag=KernelConfig\u0026x=a989f27ebc47e2dc", "kernel-source-commit": "1111111111111111111111111111111111111111", "syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1", - "syzkaller-commit": "syzkaller_commit1" + "syzkaller-commit": "syzkaller_commit1", + "crash-report-link": "/text?tag=CrashReport\u0026x=12000000000000" } ] }`) @@ -189,7 +192,8 @@ func TestJSONAPICauseBisection(t *testing.T) { "kernel-config": "/text?tag=KernelConfig\u0026x=4d11162a90e18f28", "kernel-source-commit": "1111111111111111111111111111111111111111", "syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1", - "syzkaller-commit": "syzkaller_commit1" + "syzkaller-commit": "syzkaller_commit1", + "crash-report-link": "/text?tag=CrashReport\u0026x=12000000000000" } ] }`) diff --git a/dashboard/app/public_json_api.go b/dashboard/app/public_json_api.go index 87ee5663a..159586132 100644 --- a/dashboard/app/public_json_api.go +++ b/dashboard/app/public_json_api.go @@ -39,6 +39,7 @@ type publicAPICrashDescription struct { SyzkallerCommit string `json:"syzkaller-commit,omitempty"` CompilerDescription string `json:"compiler-description,omitempty"` Architecture string `json:"architecture,omitempty"` + CrashReport string `json:"crash-report-link,omitempty"` } func getExtAPIDescrForBugPage(bugPage *uiBugPage) *publicAPIBugDescription { @@ -94,6 +95,7 @@ func getExtAPIDescrForBugPage(bugPage *uiBugPage) *publicAPIBugDescription { SyzkallerCommit: crash.SyzkallerCommit, // TODO: add the CompilerDescription // TODO: add the Architecture + CrashReport: crash.ReportLink, }) } return res -- cgit mrf-deployment