aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-06-14 10:11:25 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-06-14 11:48:08 +0200
commit4ec126bcb75d6e6a2a03164b1509ba1cd6a0dcd3 (patch)
treee7cd1265254e229e7666253fe434072f4d8972db
parentf5ba04758374afae0c1edcf28425758a50ce78be (diff)
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
-rw-r--r--syz-ci/manager.go26
1 files 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)
}