summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/contexttest/BUILD
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2018-12-12 17:47:01 -0800
committerShentubot <shentubot@google.com>2018-12-12 17:47:55 -0800
commitccce1d4281ce82fe551d7c8569fe3a545c62e296 (patch)
treecbcfbd64ba151097c5734102f6d1e1dfecdcd160 /pkg/sentry/kernel/contexttest/BUILD
parentf93c288dd70846f335239e2d0cb351135a756f51 (diff)
Filesystems shouldn't be saving references to Platform.
Platform objects are not savable, storing references to them in filesystem datastructures would cause save to fail if someone actually passed in a Platform. Current implementations work because everywhere a Platform is expected, we currently pass in a Kernel object which embeds Platform and thus satisfies the interface. Eliminate this indirection and save pointers to Kernel directly. PiperOrigin-RevId: 225288336 Change-Id: Ica399ff43f425e15bc150a0d7102196c3d54a2ab
Diffstat (limited to 'pkg/sentry/kernel/contexttest/BUILD')
-rw-r--r--pkg/sentry/kernel/contexttest/BUILD17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/contexttest/BUILD b/pkg/sentry/kernel/contexttest/BUILD
new file mode 100644
index 000000000..391986291
--- /dev/null
+++ b/pkg/sentry/kernel/contexttest/BUILD
@@ -0,0 +1,17 @@
+package(licenses = ["notice"]) # Apache 2.0
+
+load("//tools/go_stateify:defs.bzl", "go_library")
+
+go_library(
+ name = "contexttest",
+ testonly = 1,
+ srcs = ["contexttest.go"],
+ importpath = "gvisor.googlesource.com/gvisor/pkg/sentry/kernel/contexttest",
+ visibility = ["//pkg/sentry:internal"],
+ deps = [
+ "//pkg/sentry/context",
+ "//pkg/sentry/context/contexttest",
+ "//pkg/sentry/kernel",
+ "//pkg/sentry/platform",
+ ],
+)