summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/verity/BUILD
diff options
context:
space:
mode:
authorChong Cai <chongc@google.com>2020-09-30 11:19:16 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-30 11:21:37 -0700
commit299e5d6e4035d0792dd06562d6b495a85797db87 (patch)
tree5ff7cb071d17cd32ccdbab158c49a8b1a905425b /pkg/sentry/fsimpl/verity/BUILD
parent3ef549b67f83fdbc1c7aa30c2b8531f38419461e (diff)
Add verity fs tests
The tests confirms that when a file is opened in verity, the corresponding Merkle trees are generated. Also a normal read succeeds on verity enabled files, but fails if either the verity file or the Merkle tree file is modified. PiperOrigin-RevId: 334640331
Diffstat (limited to 'pkg/sentry/fsimpl/verity/BUILD')
-rw-r--r--pkg/sentry/fsimpl/verity/BUILD21
1 files changed, 20 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/verity/BUILD b/pkg/sentry/fsimpl/verity/BUILD
index bc8e38431..0ca750281 100644
--- a/pkg/sentry/fsimpl/verity/BUILD
+++ b/pkg/sentry/fsimpl/verity/BUILD
@@ -1,4 +1,4 @@
-load("//tools:defs.bzl", "go_library")
+load("//tools:defs.bzl", "go_library", "go_test")
licenses(["notice"])
@@ -26,3 +26,22 @@ go_library(
"//pkg/usermem",
],
)
+
+go_test(
+ name = "verity_test",
+ srcs = [
+ "verity_test.go",
+ ],
+ library = ":verity",
+ deps = [
+ "//pkg/abi/linux",
+ "//pkg/context",
+ "//pkg/fspath",
+ "//pkg/sentry/arch",
+ "//pkg/sentry/fsimpl/tmpfs",
+ "//pkg/sentry/kernel/auth",
+ "//pkg/sentry/kernel/contexttest",
+ "//pkg/sentry/vfs",
+ "//pkg/usermem",
+ ],
+)