From fd37b39ea8db38458059092f5f94b582392e8922 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Mon, 19 Aug 2019 18:23:15 -0700 Subject: 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". --- pkg/host/host.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/host') 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"} -- cgit mrf-deployment