aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-05-13 17:51:56 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-05-13 20:37:26 +0200
commit3d789641a384b4356a5a9e7c65ca94eda68915b3 (patch)
treed0f73efce60789d0dd3199df91230499d3380bc3 /pkg/instance
parentb3fe7470a482f2a877cbe43f46636153031b20e3 (diff)
pkg/report: add Report.SkipPos
SkipPos is what pkg/instance needs, but also will be needed for ParseAll.
Diffstat (limited to 'pkg/instance')
-rw-r--r--pkg/instance/instance.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index d88838576..39de02017 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -6,7 +6,6 @@
package instance
import (
- "bytes"
"encoding/json"
"fmt"
"net"
@@ -245,11 +244,7 @@ func (inst *inst) test() error {
rep := inst.reporter.Parse(testErr.Output)
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 {
- output = testErr.Output[rep.StartPos+pos:]
- }
- rep = inst.reporter.Parse(output)
+ rep = inst.reporter.Parse(testErr.Output[rep.SkipPos:])
}
if rep == nil {
rep = &report.Report{