Skip to content

Commit 515987b

Browse files
committed
pkg/instance: extend image testing failed errors
Include a bit more info into the bug reports. The change is motivated by inactionable "image testing failed w/o kernel bug" errors like this: https://syzkaller.appspot.com/text?tag=CrashLog&x=17acec42580000
1 parent 206bcec commit 515987b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/instance/instance.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,12 @@ func RunSmokeTest(cfg *mgrconfig.Config) (*report.Report, error) {
564564
reportData, err := os.ReadFile(filepath.Join(cfg.Workdir, "report.json"))
565565
if err != nil {
566566
if os.IsNotExist(err) {
567+
var verboseErr *osutil.VerboseError
568+
if errors.As(err, &verboseErr) {
569+
// Include more details into the report.
570+
prefix := fmt.Sprintf("%s, exit code %d\n\n", verboseErr.Title, verboseErr.ExitCode)
571+
output = append([]byte(prefix), output...)
572+
}
567573
rep := &report.Report{
568574
Title: "SYZFATAL: image testing failed w/o kernel bug",
569575
Output: output,

0 commit comments

Comments
 (0)