From aff16d3fed742e27093858a70f8bd5cbf6f0dedd Mon Sep 17 00:00:00 2001 From: Joey Jiaojg Date: Wed, 3 Mar 2021 00:22:57 +0800 Subject: pkg/cover, syz-manager: show coverage summary * pkg/cover, syz-manager: show coverage summary The funccover or cover page is not easy for statistic purpose. So add /cover?type=rawfiles to show coverage based on each file. And /cover?type=table page to show coverage for group of components. If driver_path_map.json exists, /cover?type=table can show component coverage. Format example: { "all": [ "/" ], "audio": [ "/techpack/audio/asoc", "/techpack/audio/dsp", "/techpack/audio/ipc", "/sound/core" ] } If driver_path_map.json not exist, it will show one line summary. * pkg/cover: use subsystem naming * syz-manager: use /subsystemcover and /filecover * pkg/cover: use subsystem from config * pkg/mgrconfig: add kernel_subsystem * pkg/cover, tools/syz-cover: fix make test * all: fix presumit errors * pkg/cover, syz-manager: fix subsystem --- pkg/mgrconfig/config.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pkg/mgrconfig') diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go index a7476ac8e..e18607e7f 100644 --- a/pkg/mgrconfig/config.go +++ b/pkg/mgrconfig/config.go @@ -3,7 +3,10 @@ package mgrconfig -import "encoding/json" +import ( + "encoding/json" + "github.com/google/syzkaller/pkg/cover" +) type Config struct { // Instance name (used for identification and as GCE instance prefix). @@ -41,6 +44,12 @@ type Config struct { KernelSrc string `json:"kernel_src,omitempty"` // Location of the driectory where the kernel was built (if not set defaults to KernelSrc) KernelBuildSrc string `json:"kernel_build_src"` + // Kernel subsystem with paths to each subsystem + // "kernel_subsystem": [ + // { "name": "sound", "path": ["sound", "techpack/audio"]}, + // { "name": "mydriver": "path": ["mydriver_path"]} + // ] + KernelSubsystem []cover.Subsystem `json:"kernel_subsystem,omitempty"` // Arbitrary optional tag that is saved along with crash reports (e.g. branch/commit). Tag string `json:"tag,omitempty"` // Location of the disk image file. -- cgit mrf-deployment