aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-07-25 16:43:02 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-07-27 10:22:23 +0200
commit4dcfea28eb0ef438c338983c63c9405554b83510 (patch)
treefe8bebdab5c1744b2076698140f9e2e7eb1d8f3d /pkg
parent22105302cc5569eff9c8dc0cb4bbf5397d479942 (diff)
pkg/host: support test OS
test OS parasitizeson other OSes just as akaros, and there is nothing to detect as well. So use the same stub for test as for akaros.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/host/host.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/host/host.go b/pkg/host/host.go
index 003ada5e7..6394dd4a0 100644
--- a/pkg/host/host.go
+++ b/pkg/host/host.go
@@ -14,7 +14,7 @@ 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" {
+ if target.OS == "akaros" || target.OS == "test" {
for _, c := range target.Syscalls {
supported[c] = true
}
@@ -77,7 +77,7 @@ func Check(target *prog.Target) (*Features, error) {
FeatureNetworkInjection: {Name: "net packed injection", Reason: unsupported},
FeatureNetworkDevices: {Name: "net device setup", Reason: unsupported},
}
- if target.OS == "akaros" {
+ if target.OS == "akaros" || target.OS == "test" {
return res, nil
}
for n, check := range checkFeature {
@@ -97,7 +97,7 @@ 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) (func(), error) {
- if target.OS == "akaros" {
+ if target.OS == "akaros" || target.OS == "test" {
return nil, nil
}
var callback func()