From 0f3a5454d62026ed8a7e9de75c82cf3861038349 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 29 Nov 2020 12:00:13 +0100 Subject: pkg/mgrconfig: remove Syz prefix from fields Everything in syzkaller is syz-something, it's pointless to add syz prefix to everything and unnecessary increases clutter. Remove the prefix. Also, rename ExecutorCmd in target to ExecutorBin to make it consistent with mgrconfig and ExecprogBin/FuzzerBin. --- pkg/instance/instance.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'pkg/instance/instance.go') diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 5ca1c2b78..861d51e72 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -302,22 +302,22 @@ func (inst *inst) testInstance() error { return fmt.Errorf("failed to setup port forwarding: %v", err) } - fuzzerBin, err := inst.vm.Copy(inst.cfg.SyzFuzzerBin) + fuzzerBin, err := inst.vm.Copy(inst.cfg.FuzzerBin) if err != nil { return &TestError{Title: fmt.Sprintf("failed to copy test binary to VM: %v", err)} } - // If SyzExecutorCmd is provided, it means that syz-executor is already in - // the image, so no need to copy it. - executorCmd := inst.cfg.SysTarget.SyzExecutorCmd - if executorCmd == "" { - executorCmd, err = inst.vm.Copy(inst.cfg.SyzExecutorBin) + // If ExecutorBin is provided, it means that syz-executor is already in the image, + // so no need to copy it. + executorBin := inst.cfg.SysTarget.ExecutorBin + if executorBin == "" { + executorBin, err = inst.vm.Copy(inst.cfg.ExecutorBin) if err != nil { return &TestError{Title: fmt.Sprintf("failed to copy test binary to VM: %v", err)} } } - cmd := OldFuzzerCmd(fuzzerBin, executorCmd, targets.TestOS, inst.cfg.TargetOS, inst.cfg.TargetArch, fwdAddr, + cmd := OldFuzzerCmd(fuzzerBin, executorBin, targets.TestOS, inst.cfg.TargetOS, inst.cfg.TargetArch, fwdAddr, inst.cfg.Sandbox, 0, inst.cfg.Cover, true) outc, errc, err := inst.vm.Run(10*time.Minute, nil, cmd) if err != nil { @@ -345,15 +345,15 @@ func (inst *inst) testInstance() error { func (inst *inst) testRepro() error { cfg := inst.cfg if len(inst.reproSyz) > 0 { - execprogBin, err := inst.vm.Copy(cfg.SyzExecprogBin) + execprogBin, err := inst.vm.Copy(cfg.ExecprogBin) if err != nil { return &TestError{Title: fmt.Sprintf("failed to copy test binary to VM: %v", err)} } - // If SyzExecutorCmd is provided, it means that syz-executor is already in - // the image, so no need to copy it. - executorCmd := cfg.SysTarget.SyzExecutorCmd - if executorCmd == "" { - executorCmd, err = inst.vm.Copy(inst.cfg.SyzExecutorBin) + // If ExecutorBin is provided, it means that syz-executor is already in the image, + // so no need to copy it. + executorBin := cfg.SysTarget.ExecutorBin + if executorBin == "" { + executorBin, err = inst.vm.Copy(inst.cfg.ExecutorBin) if err != nil { return &TestError{Title: fmt.Sprintf("failed to copy test binary to VM: %v", err)} } @@ -380,7 +380,7 @@ func (inst *inst) testRepro() error { if !opts.Fault { opts.FaultCall = -1 } - cmdSyz := ExecprogCmd(execprogBin, executorCmd, cfg.TargetOS, cfg.TargetArch, opts.Sandbox, + cmdSyz := ExecprogCmd(execprogBin, executorBin, cfg.TargetOS, cfg.TargetArch, opts.Sandbox, true, true, true, cfg.Procs, opts.FaultCall, opts.FaultNth, vmProgFile) if err := inst.testProgram(cmdSyz, 7*time.Minute); err != nil { return err -- cgit mrf-deployment