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 /vm/vm_test.go | |
| 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 'vm/vm_test.go')
| -rw-r--r-- | vm/vm_test.go | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/vm/vm_test.go b/vm/vm_test.go index 73c3198a0..6f7f18489 100644 --- a/vm/vm_test.go +++ b/vm/vm_test.go @@ -138,7 +138,32 @@ var tests = []*Test{ Report: &report.Report{ Title: lostConnectionCrash, Output: []byte( - "DIAGNOSIS:\nDIAGNOSE\n", + "\n" + + "VM DIAGNOSIS:\n" + + "DIAGNOSE\n", + ), + }, + }, + { + Name: "diagnose-bug-no-wait", + Body: func(outc chan []byte, errc chan error) { + outc <- []byte("BUG: bad\n") + time.Sleep(time.Second) + outc <- []byte("other output\n") + }, + DiagnoseNoWait: true, + Report: &report.Report{ + Title: "BUG: bad", + Report: []byte( + "BUG: bad\n" + + "other output\n", + ), + Output: []byte( + "BUG: bad\n" + + "other output\n" + + "\n" + + "VM DIAGNOSIS:\n" + + "DIAGNOSE\n", ), }, }, |
