aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/runtest/run.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-06 13:10:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-05-06 16:25:33 +0000
commit3f94021ec61c81270e948abb0efe7da66ace3d5a (patch)
tree886841b7b3e809f10927815263f3feecdebdaaa7 /pkg/runtest/run.go
parentc035c6de7b75d2ca88982bf059fd4e27cbad7a26 (diff)
pkg/repro, pkg/ipc: use flatrpc.Feature
Start switching from host.Features to flatrpc.Features. This change is supposed to be a no-op, just to reduce future diffs that will change how we obtain features.
Diffstat (limited to 'pkg/runtest/run.go')
-rw-r--r--pkg/runtest/run.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/runtest/run.go b/pkg/runtest/run.go
index 796fb6040..d32e9f8d3 100644
--- a/pkg/runtest/run.go
+++ b/pkg/runtest/run.go
@@ -23,7 +23,7 @@ import (
"strings"
"github.com/google/syzkaller/pkg/csource"
- "github.com/google/syzkaller/pkg/host"
+ "github.com/google/syzkaller/pkg/flatrpc"
"github.com/google/syzkaller/pkg/ipc"
"github.com/google/syzkaller/prog"
"github.com/google/syzkaller/sys/targets"
@@ -50,7 +50,7 @@ type RunRequest struct {
type Context struct {
Dir string
Target *prog.Target
- Features *host.Features
+ Features flatrpc.Feature
EnabledCalls map[string]map[*prog.Syscall]bool
Requests chan *RunRequest
LogFunc func(text string)
@@ -164,7 +164,7 @@ func (ctx *Context) Run() error {
func (ctx *Context) generatePrograms(progs chan *RunRequest) error {
cover := []bool{false}
- if ctx.Features[host.FeatureCoverage].Enabled {
+ if ctx.Features&flatrpc.FeatureCoverage != 0 {
cover = append(cover, true)
}
var sandboxes []string
@@ -448,22 +448,22 @@ func (ctx *Context) createCTest(p *prog.Prog, sandbox string, threaded bool, tim
HandleSegv: true,
Cgroups: p.Target.OS == targets.Linux && sandbox != "",
Trace: true,
- Swap: ctx.Features[host.FeatureSwap].Enabled,
+ Swap: ctx.Features&flatrpc.FeatureSwap != 0,
}
if sandbox != "" {
- if ctx.Features[host.FeatureNetInjection].Enabled {
+ if ctx.Features&flatrpc.FeatureNetInjection != 0 {
opts.NetInjection = true
}
- if ctx.Features[host.FeatureNetDevices].Enabled {
+ if ctx.Features&flatrpc.FeatureNetDevices != 0 {
opts.NetDevices = true
}
- if ctx.Features[host.FeatureVhciInjection].Enabled {
+ if ctx.Features&flatrpc.FeatureVhciInjection != 0 {
opts.VhciInjection = true
}
- if ctx.Features[host.FeatureWifiEmulation].Enabled {
+ if ctx.Features&flatrpc.FeatureWifiEmulation != 0 {
opts.Wifi = true
}
- if ctx.Features[host.Feature802154Emulation].Enabled {
+ if ctx.Features&flatrpc.FeatureLRWPANEmulation != 0 {
opts.IEEE802154 = true
}
}