Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions syz-ci/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,12 @@ func (mgr *Manager) restartManager() {
bin := filepath.FromSlash("syzkaller/current/bin/syz-manager")
logFile := filepath.Join(mgr.currentDir, "manager.log")
benchFile := filepath.Join(mgr.currentDir, benchFileName)
os.Remove(benchFile) // or else syz-manager will complain

args := []string{"-config", cfgFile, "-vv", "1", "-bench", benchFile}
if mgr.debug {
args = append(args, "-debug")
}
mgr.cmd = NewManagerCmd(mgr.name, logFile, mgr.Errorf, bin, args...)
mgr.cmd = NewManagerCmd(mgr.name, logFile, benchFile, mgr.Errorf, bin, args...)
mgr.lastRestarted = time.Now()
}

Expand Down
5 changes: 4 additions & 1 deletion syz-ci/managercmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
type ManagerCmd struct {
name string
log string
bench string
errorf Errorf
bin string
args []string
Expand All @@ -31,10 +32,11 @@ type Errorf func(msg string, args ...interface{})
// name - name for logging.
// log - manager log file with stdout/stderr.
// bin/args - process binary/args.
func NewManagerCmd(name, log string, errorf Errorf, bin string, args ...string) *ManagerCmd {
func NewManagerCmd(name, log, bench string, errorf Errorf, bin string, args ...string) *ManagerCmd {
mc := &ManagerCmd{
name: name,
log: log,
bench: bench,
errorf: errorf,
bin: bin,
args: args,
Expand Down Expand Up @@ -75,6 +77,7 @@ func (mc *ManagerCmd) loop() {
if time.Since(started) > restartPeriod {
started = time.Now()
osutil.Rename(mc.log, mc.log+".old")
osutil.Rename(mc.bench, mc.bench+".old") // or else syz-manager will complain
logfile, err := os.Create(mc.log)
if err != nil {
mc.errorf("failed to create manager log: %v", err)
Expand Down
Loading