diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-06-04 11:51:27 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-04 11:52:17 -0700 |
commit | 55a37ceef1e33cc72236db6e95f159963ddf40bd (patch) | |
tree | 2dadd3fa65b3cba4e756a6c63e2e61af5dc2320f /runsc/sandbox/BUILD | |
parent | a0e2126be49e5eda45dcaead497129c08e08a1e5 (diff) |
Fix leaky FD
9P socket was being created without CLOEXEC and was being inherited
by the children. This would prevent the gofer from detecting that the
sandbox had exited, because the socket would not be closed.
PiperOrigin-RevId: 199168959
Change-Id: I3ee1a07cbe7331b0aeb1cf2b697e728ce24f85a7
Diffstat (limited to 'runsc/sandbox/BUILD')
-rw-r--r-- | runsc/sandbox/BUILD | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/runsc/sandbox/BUILD b/runsc/sandbox/BUILD index e89b19552..a961c3cc7 100644 --- a/runsc/sandbox/BUILD +++ b/runsc/sandbox/BUILD @@ -1,6 +1,6 @@ package(licenses = ["notice"]) # Apache 2.0 -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "sandbox", @@ -28,3 +28,17 @@ go_library( "@org_golang_x_sys//unix:go_default_library", ], ) + +go_test( + name = "sandbox_test", + size = "small", + srcs = ["sandbox_test.go"], + data = [ + "//runsc", + ], + embed = [":sandbox"], + deps = [ + "//pkg/log", + "//runsc/test/testutil", + ], +) |