diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2019-08-19 18:23:15 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-08-27 14:39:18 -0700 |
| commit | fd37b39ea8db38458059092f5f94b582392e8922 (patch) | |
| tree | e72046a32eb190e7d069bd38c4d132a72d6fa05b /pkg/host | |
| parent | d21c5d9de0cd2f3124a8218f70c46ab97863a7a2 (diff) | |
all: convert Fuchsia to use "host fuzzing" mode
Go support is not a priority for Fuchsia at the moment, so it's
preferable to use host fuzzing mode for Fuchsia like currently done
for Akaros.
This commit basically looks for all the places where there was special
logic for OS=="akaros" and extends the same logic for OS=="fuchsia".
Diffstat (limited to 'pkg/host')
| -rw-r--r-- | pkg/host/host.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/host/host.go b/pkg/host/host.go index 25f762608..c7454d12b 100644 --- a/pkg/host/host.go +++ b/pkg/host/host.go @@ -20,7 +20,8 @@ func DetectSupportedSyscalls(target *prog.Target, sandbox string) ( supported := make(map[*prog.Syscall]bool) unsupported := make(map[*prog.Syscall]string) // Akaros does not have own host and parasitizes on some other OS. - if target.OS == "akaros" || target.OS == "test" { + switch target.OS { + case "akaros", "fuchsia", "test": for _, c := range target.Syscalls { supported[c] = true } @@ -106,7 +107,8 @@ func Check(target *prog.Target) (*Features, error) { FeatureNetworkInjection: {Name: "net packet injection", Reason: unsupported}, FeatureNetworkDevices: {Name: "net device setup", Reason: unsupported}, } - if target.OS == "akaros" || target.OS == "test" { + switch target.OS { + case "akaros", "fuchsia", "test": return res, nil } for n, check := range checkFeature { @@ -126,7 +128,8 @@ func Check(target *prog.Target) (*Features, error) { // Setup enables and does any one-time setup for the requested features on the host. // Note: this can be called multiple times and must be idempotent. func Setup(target *prog.Target, features *Features, featureFlags csource.Features, executor string) error { - if target.OS == "akaros" { + switch target.OS { + case "akaros", "fuchsia": return nil } args := []string{"setup"} |
