aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-05-21 12:23:44 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-21 12:23:44 +0200
commitf35ffcc16f1a5596137035584d2328ff290d63ca (patch)
treedf2896cf77e8764dbe6d3ba083addc9b621e1581 /pkg
parentd46b0931bd77acb1e5037453180f6ea300614f8b (diff)
pkg/host: don't enable binfmt_misc on non-linux
The csource options lack any relation to the tested OS, while they do depend on the tested OS (most are linux-specific). As the result we enable binfmt_misc, but its setup fails on anything other than linux. As a work-around don't enable binfmt_misc on non-linux.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/host/host.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/host/host.go b/pkg/host/host.go
index 00bcde314..972656ad7 100644
--- a/pkg/host/host.go
+++ b/pkg/host/host.go
@@ -121,7 +121,7 @@ func Setup(target *prog.Target, features *Features, featureFlags csource.Feature
if features[FeatureFaultInjection].Enabled {
args = append(args, "fault")
}
- if featureFlags["binfmt_misc"].Enabled {
+ if target.OS == "linux" && featureFlags["binfmt_misc"].Enabled {
args = append(args, "binfmt_misc")
}
_, err := osutil.RunCmd(time.Minute, "", executor, args...)