Skip to content

Commit

Permalink
pkg/host: don't enable binfmt_misc on non-linux
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dvyukov committed May 21, 2019
1 parent d46b093 commit f35ffcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit f35ffcc

Please sign in to comment.