aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-05-20 18:30:54 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-20 19:40:20 +0200
commit4d4a4420e72dba0231c8ce5921eb75dddab88747 (patch)
tree34f2ae02ce4ce3db0ac7aa3d86ac159866834b1f /pkg/instance
parentcddddce85a40e86cef84d52e851e0c7a16ead437 (diff)
pkg/report: add Type/Frame to Report
In several places we do special handling for some crash types. Currently we compare report title with magic strings, which is error-prone. Add explicit Type to reports.
Diffstat (limited to 'pkg/instance')
-rw-r--r--pkg/instance/instance.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index 960272245..4bd483d61 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -226,7 +226,7 @@ func (inst *inst) test() error {
if bootErr, ok := err.(vm.BootErrorer); ok {
testErr.Title, testErr.Output = bootErr.BootError()
rep := inst.reporter.Parse(testErr.Output)
- if rep != nil && rep.Title == report.UnexpectedKernelReboot {
+ if rep != nil && rep.Type == report.UnexpectedReboot {
// Avoid detecting any boot crash as "unexpected kernel reboot".
output := testErr.Output[rep.EndPos:]
if pos := bytes.IndexByte(testErr.Output[rep.StartPos:], '\n'); pos != -1 {