aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/instance.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-11-29 12:00:13 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-11-30 13:33:18 +0100
commit0f3a5454d62026ed8a7e9de75c82cf3861038349 (patch)
tree34366bd74c5547d30d5b5b2f367d69f446934e14 /pkg/instance/instance.go
parent1fd901159188a5e0c2b3559ae7ec7deff7c4e7a2 (diff)
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.
Diffstat (limited to 'pkg/instance/instance.go')
-rw-r--r--pkg/instance/instance.go28
1 files changed, 14 insertions, 14 deletions
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