aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/dashboard
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-01-31 12:38:41 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-02-04 14:57:28 +0000
commit2cfec537a35f8e7bcb50a3302d73bb98be70e426 (patch)
tree27f60eebd3368729e00a35b1662662771948d0df /syz-cluster/dashboard
parent10f46061d0a00f1bfb6c1f0f34509e1656a3bb23 (diff)
syz-cluster: store session test logs
Record the logs from the build and fuzzing steps.
Diffstat (limited to 'syz-cluster/dashboard')
-rw-r--r--syz-cluster/dashboard/handler.go12
-rw-r--r--syz-cluster/dashboard/main.go1
-rw-r--r--syz-cluster/dashboard/templates/series.html7
3 files changed, 19 insertions, 1 deletions
diff --git a/syz-cluster/dashboard/handler.go b/syz-cluster/dashboard/handler.go
index f744a5ca9..33c838b85 100644
--- a/syz-cluster/dashboard/handler.go
+++ b/syz-cluster/dashboard/handler.go
@@ -187,6 +187,18 @@ func (h *dashboardHandler) findingInfo(w http.ResponseWriter, r *http.Request) {
}
}
+func (h *dashboardHandler) sessionTestLog(w http.ResponseWriter, r *http.Request) {
+ test, err := h.sessionTestRepo.Get(r.Context(), r.PathValue("id"), r.FormValue("name"))
+ if err != nil {
+ http.Error(w, fmt.Sprint(err), http.StatusInternalServerError)
+ return
+ } else if test == nil {
+ http.Error(w, "there's no such test", http.StatusNotFound)
+ return
+ }
+ h.streamBlob(w, test.LogURI)
+}
+
func (h *dashboardHandler) streamBlob(w http.ResponseWriter, uri string) {
if uri == "" {
return
diff --git a/syz-cluster/dashboard/main.go b/syz-cluster/dashboard/main.go
index 0497cc86b..064dd31da 100644
--- a/syz-cluster/dashboard/main.go
+++ b/syz-cluster/dashboard/main.go
@@ -27,6 +27,7 @@ func main() {
app.Fatalf("failed to set up handler: %v", err)
}
http.HandleFunc("/sessions/{id}/log", handler.sessionLog)
+ http.HandleFunc("/sessions/{id}/test_logs", handler.sessionTestLog)
http.HandleFunc("/series/{id}", handler.seriesInfo)
http.HandleFunc("/patches/{id}", handler.patchContent)
http.HandleFunc("/findings/{id}/{key}", handler.findingInfo)
diff --git a/syz-cluster/dashboard/templates/series.html b/syz-cluster/dashboard/templates/series.html
index adc10b8d2..042f9efba 100644
--- a/syz-cluster/dashboard/templates/series.html
+++ b/syz-cluster/dashboard/templates/series.html
@@ -117,7 +117,12 @@
<td>{{.TestName}}</td>
<td>{{if .BaseBuild}}{{.BaseBuild.CommitHash}}{{end}}</td>
<td>{{if .PatchedBuild}}{{.PatchedBuild.CommitHash}}[patched]{{end}}</td>
- <th>{{.Result}}</th>
+ <th>
+ {{.Result}}
+ {{if .LogURI}}
+ <a href="/sessions/{{.SessionID}}/test_logs?name={{.TestName}}" class="modal-link-raw">[Log]</a>
+ {{end}}
+ </th>
</tr>
{{if .Findings}}
<tr>