diff options
Diffstat (limited to 'pkg/csource')
| -rw-r--r-- | pkg/csource/common.go | 1 | ||||
| -rw-r--r-- | pkg/csource/options.go | 4 | ||||
| -rw-r--r-- | pkg/csource/options_test.go | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/pkg/csource/common.go b/pkg/csource/common.go index 4b9b37455..6f3920126 100644 --- a/pkg/csource/common.go +++ b/pkg/csource/common.go @@ -117,6 +117,7 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool { "SYZ_CLOSE_FDS": opts.CloseFDs, "SYZ_KCSAN": opts.KCSAN, "SYZ_DEVLINK_PCI": opts.DevlinkPCI, + "SYZ_NIC_VF": opts.NicVF, "SYZ_USB": opts.USB, "SYZ_VHCI_INJECTION": opts.VhciInjection, "SYZ_USE_TMP_DIR": opts.UseTmpDir, diff --git a/pkg/csource/options.go b/pkg/csource/options.go index b150e79a0..45cedb6a9 100644 --- a/pkg/csource/options.go +++ b/pkg/csource/options.go @@ -37,6 +37,7 @@ type Options struct { CloseFDs bool `json:"close_fds"` KCSAN bool `json:"kcsan,omitempty"` DevlinkPCI bool `json:"devlinkpci,omitempty"` + NicVF bool `json:"nicvf,omitempty"` USB bool `json:"usb,omitempty"` VhciInjection bool `json:"vhci,omitempty"` Wifi bool `json:"wifi,omitempty"` @@ -141,6 +142,7 @@ func (opts Options) checkLinuxOnly(OS string) error { "CloseFDs": &opts.CloseFDs, "KCSAN": &opts.KCSAN, "DevlinkPCI": &opts.DevlinkPCI, + "NicVF": &opts.NicVF, "USB": &opts.USB, "VhciInjection": &opts.VhciInjection, "Wifi": &opts.Wifi, @@ -175,6 +177,7 @@ func DefaultOpts(cfg *mgrconfig.Config) Options { opts.BinfmtMisc = true opts.CloseFDs = true opts.DevlinkPCI = true + opts.NicVF = true opts.USB = true opts.VhciInjection = true opts.Wifi = true @@ -307,6 +310,7 @@ func defaultFeatures(value bool) Features { "binfmt_misc": {"setup binfmt_misc for testing", value}, "close_fds": {"close fds after each program", value}, "devlink_pci": {"setup devlink PCI device", value}, + "nic_vf": {"setup NIC VF device", value}, "usb": {"setup and use /dev/raw-gadget for USB emulation", value}, "vhci": {"setup and use /dev/vhci for hci packet injection", value}, "wifi": {"setup and use mac80211_hwsim for wifi emulation", value}, diff --git a/pkg/csource/options_test.go b/pkg/csource/options_test.go index 41d7cdbab..5edc56d02 100644 --- a/pkg/csource/options_test.go +++ b/pkg/csource/options_test.go @@ -308,6 +308,7 @@ func TestParseFeaturesFlags(t *testing.T) { "binfmt_misc": true, "close_fds": true, "devlink_pci": true, + "nic_vf": true, "usb": true, "vhci": true, "wifi": true, @@ -323,6 +324,7 @@ func TestParseFeaturesFlags(t *testing.T) { "binfmt_misc": true, "close_fds": true, "devlink_pci": true, + "nic_vf": true, "usb": true, "vhci": true, "wifi": true, @@ -339,6 +341,7 @@ func TestParseFeaturesFlags(t *testing.T) { "binfmt_misc": true, "close_fds": true, "devlink_pci": true, + "nic_vf": true, "usb": true, "vhci": true, "wifi": true, @@ -355,6 +358,7 @@ func TestParseFeaturesFlags(t *testing.T) { "binfmt_misc": true, "close_fds": true, "devlink_pci": true, + "nic_vf": true, "usb": true, "vhci": true, "wifi": true, |
