aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci/manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'syz-ci/manager.go')
-rw-r--r--syz-ci/manager.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/syz-ci/manager.go b/syz-ci/manager.go
index cdbd6b40f..21941cfde 100644
--- a/syz-ci/manager.go
+++ b/syz-ci/manager.go
@@ -430,6 +430,13 @@ func (mgr *Manager) restartManager() {
mgr.Errorf("failed to load build info: %v", err)
return
}
+ // HEAD might be pointing to a different commit now e.g. due to a recent failed kernel
+ // build attempt, so let's always reset it to the commit the current kernel was built at.
+ _, err = mgr.repo.CheckoutCommit(mgr.mgrcfg.Repo, info.KernelCommit)
+ if err != nil {
+ mgr.Errorf("failed to check out the last kernel commit %q: %v", info.KernelCommit, err)
+ return
+ }
buildTag, err := mgr.uploadBuild(info, mgr.currentDir)
if err != nil {
mgr.Errorf("failed to upload build: %v", err)