Skip to content

Commit ae98e6b

Browse files
committed
vm/vmimpl: explicitly indicate empty boot output
It will help distinguish the cases when the output was collected, but lost somewhere during the reporting pipeline, or it was empty in the first place, e.g. because qemu could not start at all. Cc #5986.
1 parent 6ca47dd commit ae98e6b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vm/vmimpl/vmimpl.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ type BootError struct {
9696
}
9797

9898
func MakeBootError(err error, output []byte) error {
99+
if len(output) == 0 {
100+
// In reports, it may be helpful to distinguish the case when the boot output
101+
// was collected, but turned out to be empty.
102+
output = []byte("<empty boot output>")
103+
}
99104
var verboseError *osutil.VerboseError
100105
if errors.As(err, &verboseError) {
101106
return BootError{verboseError.Title, append(verboseError.Output, output...)}

0 commit comments

Comments
 (0)