From 4ec126bcb75d6e6a2a03164b1509ba1cd6a0dcd3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 14 Jun 2020 10:11:25 +0200 Subject: syz-ci: report all build errors Currently we are specifically picky about what errors during build process are reported and what are not reported. E.g. if we fail to create some temp file due to ENOSPSC, we don't want to send email to all kernel developers. However, we have not seen lots of infra failures and we've seen silent errors which were unnoticed and/or caused confusion as to what happens and why kernels are not updated. Report all errors. If needed later we may explicitly ignore some errors instead. Fixes #1777 --- syz-ci/manager.go | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/syz-ci/manager.go b/syz-ci/manager.go index 743f52f42..b715a5fa5 100644 --- a/syz-ci/manager.go +++ b/syz-ci/manager.go @@ -306,16 +306,22 @@ func (mgr *Manager) build(kernelCommit *vcs.Commit) error { Config: mgr.configData, } if _, err := build.Image(params); err != nil { - if buildErr, ok := err.(*build.KernelError); ok { - rep := &report.Report{ - Title: fmt.Sprintf("%v build error", mgr.mgrcfg.RepoAlias), - Report: buildErr.Report, - Output: buildErr.Output, - Maintainers: buildErr.Maintainers, - } - if err := mgr.reportBuildError(rep, info, tmpDir); err != nil { - mgr.Errorf("failed to report image error: %v", err) - } + rep := &report.Report{ + Title: fmt.Sprintf("%v build error", mgr.mgrcfg.RepoAlias), + } + switch err1 := err.(type) { + case *build.KernelError: + rep.Report = err1.Report + rep.Output = err1.Output + rep.Maintainers = err1.Maintainers + case *osutil.VerboseError: + rep.Report = []byte(err1.Title) + rep.Output = err1.Output + default: + rep.Report = []byte(err.Error()) + } + if err := mgr.reportBuildError(rep, info, tmpDir); err != nil { + mgr.Errorf("failed to report image error: %v", err) } return fmt.Errorf("kernel build failed: %v", err) } -- cgit mrf-deployment