From 78267cec1aaa5e066d66e6a6c76fea1753e51b46 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 21 Mar 2020 16:30:35 +0100 Subject: vm: better handle VM diagnosis output 1. Always append diagnosis output at the end. Don't intermix it with kernel output. It's confusing and not useful. 2. Don't include diagnosis output into Report. It's too verbose and is not the crash. Keep it only in the Output. --- pkg/report/report.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg') diff --git a/pkg/report/report.go b/pkg/report/report.go index 4d16edd51..673407f92 100644 --- a/pkg/report/report.go +++ b/pkg/report/report.go @@ -120,6 +120,8 @@ func NewReporter(cfg *mgrconfig.Config) (Reporter, error) { } const ( + VMDiagnosisStart = "\nVM DIAGNOSIS:\n" + unexpectedKernelReboot = "unexpected kernel reboot" memoryLeakPrefix = "memory leak in " dataRacePrefix = "KCSAN: data-race" @@ -179,6 +181,9 @@ func (wrap *reporterWrapper) Parse(output []byte) *Report { if match := reportFrameRe.FindStringSubmatch(rep.Title); match != nil { rep.Frame = match[1] } + if pos := bytes.Index(rep.Report, []byte(VMDiagnosisStart)); pos != -1 { + rep.Report = rep.Report[:pos] + } return rep } -- cgit mrf-deployment