aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/execprog.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-09-24 17:22:33 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-09-25 09:06:08 +0000
commit0b45cac3dc627e9b6702daf3d578d970440972e9 (patch)
treebdb64625a2b3e3d45bb7b788ea540ed0b485d2c9 /pkg/instance/execprog.go
parent1763a1862f3468b4b1a5cedef9d61ddd8d0e58e8 (diff)
pkg/instance: refactor ExecprogCmd
Reduce the number of arguments by using a csource.Option value directly.
Diffstat (limited to 'pkg/instance/execprog.go')
-rw-r--r--pkg/instance/execprog.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/instance/execprog.go b/pkg/instance/execprog.go
index 401da784e..9363998ab 100644
--- a/pkg/instance/execprog.go
+++ b/pkg/instance/execprog.go
@@ -173,12 +173,7 @@ func (inst *ExecProgInstance) RunSyzProgFile(progFile string, duration time.Dura
return nil, &TestError{Title: fmt.Sprintf("failed to copy prog to VM: %v", err)}
}
target := inst.mgrCfg.SysTarget
- faultCall := -1
- if opts.Fault {
- faultCall = opts.FaultCall
- }
- command := ExecprogCmd(inst.execprogBin, inst.executorBin, target.OS, target.Arch, inst.mgrCfg.Type, opts.Sandbox,
- opts.SandboxArg, opts.Repeat, opts.Threaded, opts.Collide, opts.Procs, faultCall, opts.FaultNth,
+ command := ExecprogCmd(inst.execprogBin, inst.executorBin, target.OS, target.Arch, inst.mgrCfg.Type, opts,
!inst.OldFlagsCompatMode, inst.mgrCfg.Timeouts.Slowdown, vmProgFile)
return inst.runCommand(command, duration, exitCondition)
}