From 80b6c954f8daa8d9910698be9eca6d97284a75a0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 19 Dec 2016 17:39:03 +0100 Subject: manager: add ability to ignore bugs Add new config parameter "ignores" which contains list of regexp expressions. If one of the expressions is matched against oops line, crash report is not saved and VM is not restarted. --- tools/syz-crush/crush.go | 4 ++-- tools/syz-report/syz-report.go | 2 +- tools/syz-repro/repro.go | 2 +- tools/syz-symbolize/symbolize.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/syz-crush/crush.go b/tools/syz-crush/crush.go index 32b4a715b..d519107f9 100644 --- a/tools/syz-crush/crush.go +++ b/tools/syz-crush/crush.go @@ -33,7 +33,7 @@ var ( func main() { flag.Parse() - cfg, _, _, err := config.Parse(*flagConfig) + cfg, _, err := config.Parse(*flagConfig) if err != nil { Fatalf("%v", err) } @@ -113,7 +113,7 @@ func runInstance(cfg *config.Config, vmCfg *vm.Config) { } Logf(0, "%v: crushing...", vmCfg.Name) - desc, _, output, crashed, timedout := vm.MonitorExecution(outc, errc, cfg.Type == "local", true) + desc, _, output, crashed, timedout := vm.MonitorExecution(outc, errc, cfg.Type == "local", true, cfg.ParsedIgnores) if timedout { // This is the only "OK" outcome. Logf(0, "%v: running long enough, restarting", vmCfg.Name) diff --git a/tools/syz-report/syz-report.go b/tools/syz-report/syz-report.go index aed958b51..eff8d6b8c 100644 --- a/tools/syz-report/syz-report.go +++ b/tools/syz-report/syz-report.go @@ -21,7 +21,7 @@ func main() { fmt.Fprintf(os.Stderr, "failed to read report file: %v\n", err) os.Exit(1) } - desc, text, _, _ := report.Parse(output) + desc, text, _, _ := report.Parse(output, nil) if desc == "" { fmt.Fprintf(os.Stderr, "report file does not contain a crash\n") os.Exit(1) diff --git a/tools/syz-repro/repro.go b/tools/syz-repro/repro.go index fb9ad0ef6..e2e2f6985 100644 --- a/tools/syz-repro/repro.go +++ b/tools/syz-repro/repro.go @@ -30,7 +30,7 @@ var ( func main() { os.Args = append(append([]string{}, os.Args[0], "-v=10"), os.Args[1:]...) flag.Parse() - cfg, _, _, err := config.Parse(*flagConfig) + cfg, _, err := config.Parse(*flagConfig) if err != nil { Fatalf("%v", err) } diff --git a/tools/syz-symbolize/symbolize.go b/tools/syz-symbolize/symbolize.go index df4f4765f..4e5e8564b 100644 --- a/tools/syz-symbolize/symbolize.go +++ b/tools/syz-symbolize/symbolize.go @@ -29,7 +29,7 @@ func main() { fmt.Fprintf(os.Stderr, "failed to open input file: %v\n", err) os.Exit(1) } - if _, parsed, _, _ := report.Parse(text); len(parsed) != 0 { + if _, parsed, _, _ := report.Parse(text, nil); len(parsed) != 0 { text = parsed } text, err = report.Symbolize(filepath.Join(*flagLinux, "vmlinux"), text) -- cgit mrf-deployment