diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-03-21 16:30:35 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-03-21 16:30:35 +0100 |
| commit | 78267cec1aaa5e066d66e6a6c76fea1753e51b46 (patch) | |
| tree | 8182100cb65b01bc5763cffac7486d7a44b72483 /pkg | |
| parent | d60b9c6b0ec77c5d458a17467f1b4939cc2f6812 (diff) | |
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.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/report/report.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 } |
