From 0571368b3bc37f92b06873e02342317006b0da60 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 8 Nov 2024 12:22:28 +0100 Subject: pkg/manager: move HTML code to separate files --- pkg/manager/html/common.html | 60 +++++++++++++++++++ pkg/manager/html/corpus.html | 4 ++ pkg/manager/html/crash.html | 33 +++++++++++ pkg/manager/html/fallback_cover.html | 19 ++++++ pkg/manager/html/job_list.html | 20 +++++++ pkg/manager/html/main.html | 112 +++++++++++++++++++++++++++++++++++ pkg/manager/html/prio.html | 18 ++++++ pkg/manager/html/raw_cover.html | 22 +++++++ pkg/manager/html/syscalls.html | 22 +++++++ pkg/manager/html/text.html | 7 +++ pkg/manager/html/vms.html | 24 ++++++++ 11 files changed, 341 insertions(+) create mode 100644 pkg/manager/html/common.html create mode 100644 pkg/manager/html/corpus.html create mode 100644 pkg/manager/html/crash.html create mode 100644 pkg/manager/html/fallback_cover.html create mode 100644 pkg/manager/html/job_list.html create mode 100644 pkg/manager/html/main.html create mode 100644 pkg/manager/html/prio.html create mode 100644 pkg/manager/html/raw_cover.html create mode 100644 pkg/manager/html/syscalls.html create mode 100644 pkg/manager/html/text.html create mode 100644 pkg/manager/html/vms.html (limited to 'pkg/manager/html') diff --git a/pkg/manager/html/common.html b/pkg/manager/html/common.html new file mode 100644 index 000000000..6a8599902 --- /dev/null +++ b/pkg/manager/html/common.html @@ -0,0 +1,60 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + {{.PageTitle}} + {{HEAD}} + + +
+ + + + + + +
+

syzkaller

+
+
+ +
+ +
+
+ %s + diff --git a/pkg/manager/html/corpus.html b/pkg/manager/html/corpus.html new file mode 100644 index 000000000..2c3a9272c --- /dev/null +++ b/pkg/manager/html/corpus.html @@ -0,0 +1,4 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} diff --git a/pkg/manager/html/crash.html b/pkg/manager/html/crash.html new file mode 100644 index 000000000..6554f2817 --- /dev/null +++ b/pkg/manager/html/crash.html @@ -0,0 +1,33 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + +{{.Description}} + +{{if .Triaged}} +Report: {{.Triaged}} +{{end}} + + + + + + + + + + {{range $c := $.Crashes}} + + + + + {{end}} + + + + + {{end}} +
#LogReportTimeTag
{{$c.Index}}log + {{if $c.Report}} + report{{formatTime $c.Time}}{{formatTagHash $c.Tag}}
diff --git a/pkg/manager/html/fallback_cover.html b/pkg/manager/html/fallback_cover.html new file mode 100644 index 000000000..007278224 --- /dev/null +++ b/pkg/manager/html/fallback_cover.html @@ -0,0 +1,19 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + + + + {{range $c := $.Calls}} + + + + + + {{end}} +
CallSuccessfulErrnos
{{$c.Name}}{{if $c.Successful}}{{$c.Successful}}{{end}}{{range $e := $c.Errnos}}{{$e}} {{end}}
diff --git a/pkg/manager/html/job_list.html b/pkg/manager/html/job_list.html new file mode 100644 index 000000000..229f8df18 --- /dev/null +++ b/pkg/manager/html/job_list.html @@ -0,0 +1,20 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + + + + + {{range $job := $.Jobs}} + + + + + + {{end}} +
{{.PageTitle}} ({{len .Jobs}}):
ProgramCallsExecs
{{$job.Short}}{{$job.Calls}}{{$job.Execs}}
diff --git a/pkg/manager/html/main.html b/pkg/manager/html/main.html new file mode 100644 index 000000000..1b4ea0f75 --- /dev/null +++ b/pkg/manager/html/main.html @@ -0,0 +1,112 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + {{range $s := $.Stats}} + + + + + {{end}} +
{{$s.Name}} + {{if $s.Link}} + {{$s.Value}} + {{else}} + {{$s.Value}} + {{end}} +
+ +{{if .Crashes}} + + + + + + + + + {{range $c := $.Crashes}} + + + + + + + {{end}} +
Crashes:
DescriptionCountLast TimeReport
{{$c.Description}}{{$c.Count}}{{formatTime $c.LastTime}} + {{if $c.Triaged}} + {{$c.Triaged}} + {{end}} + {{if $c.Strace}} + Strace + {{end}} +
+{{end}} + +{{define "diff_crashes"}} + + + + + + + + {{range $bug := .List}} + + + + + + {{end}} +
{{.Title}}:
DescriptionBasePatched
{{$bug.Title}} + {{if gt $bug.Base.Crashes 0}} + {{$bug.Base.Crashes}} crashes + {{else if $bug.Base.NotCrashed}} + Not affected + {{else}} ? {{end}} + {{if $bug.Base.Report}} + [report] + {{end}} + + {{if gt $bug.Patched.Crashes 0}} + {{$bug.Patched.Crashes}} crashes + {{else}} ? {{end}} + {{if $bug.Patched.Report}} + [report] + {{end}} + {{if $bug.Patched.CrashLog}} + [crash log] + {{end}} + {{if $bug.Patched.Repro}} + [syz repro] + {{end}} + {{if $bug.Patched.ReproLog}} + [repro log] + {{end}} + {{if $bug.Reproducing}}[reproducing]{{end}} +
+{{end}} + +{{if .PatchedOnly}} +{{template "diff_crashes" .PatchedOnly}} +{{end}} + +{{if .AffectsBoth}} +{{template "diff_crashes" .AffectsBoth}} +{{end}} + +{{if .InProgress}} +{{template "diff_crashes" .InProgress}} +{{end}} + +Log: +
+ + diff --git a/pkg/manager/html/prio.html b/pkg/manager/html/prio.html new file mode 100644 index 000000000..551ec117b --- /dev/null +++ b/pkg/manager/html/prio.html @@ -0,0 +1,18 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + + + + {{range $p := $.Prios}} + + + + + {{end}} +
Priorities for {{$.Call}}:
PrioCall
{{printf "%5v" $p.Prio}}{{$p.Call}}
diff --git a/pkg/manager/html/raw_cover.html b/pkg/manager/html/raw_cover.html new file mode 100644 index 000000000..391e8e80f --- /dev/null +++ b/pkg/manager/html/raw_cover.html @@ -0,0 +1,22 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + + + + {{range $line := .Calls}} + + + + + {{end}} +
Raw cover
LineLinks
{{$line.Call}} + {{range $id := $line.UpdateIDs}} + [{{$id}}] + {{end}} +
diff --git a/pkg/manager/html/syscalls.html b/pkg/manager/html/syscalls.html new file mode 100644 index 000000000..cb6991f42 --- /dev/null +++ b/pkg/manager/html/syscalls.html @@ -0,0 +1,22 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + + + + + + {{range $c := $.Calls}} + + + + + + + {{end}} +
Per-syscall coverage:
SyscallInputsCoveragePrio
{{$c.Name}}{{if $c.ID }} [{{$c.ID}}]{{end}}{{$c.Inputs}}{{$c.Cover}}prio
diff --git a/pkg/manager/html/text.html b/pkg/manager/html/text.html new file mode 100644 index 000000000..8e991a90e --- /dev/null +++ b/pkg/manager/html/text.html @@ -0,0 +1,7 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + +{{.HTML}} +
{{printf "%s" .Text}}
diff --git a/pkg/manager/html/vms.html b/pkg/manager/html/vms.html new file mode 100644 index 000000000..35c9d6c8c --- /dev/null +++ b/pkg/manager/html/vms.html @@ -0,0 +1,24 @@ +{{/* +Copyright 2024 syzkaller project authors. All rights reserved. +Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. +*/}} + + + + + + + + + + + {{range $vm := $.VMs}} + + + + + + + + {{end}} +
VM Info:
NameStateSinceMachine InfoStatus
{{$vm.Name}}{{$vm.State}}{{formatDuration $vm.Since}}{{optlink $vm.MachineInfo "info"}}{{optlink $vm.DetailedStatus "status"}}
-- cgit mrf-deployment