diff options
author | Fabricio Voznika <fvoznika@google.com> | 2020-04-07 09:40:38 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-04-07 09:41:58 -0700 |
commit | 94319a8241cb299edc812024d6132b7a3819a4dc (patch) | |
tree | ea42151feb97c84da806aa2a0f7a9c180fd1b5a4 /pkg/sentry/fsimpl/gofer/BUILD | |
parent | 51e461cf9c49f6ad5a9a68d93c5928647aae11d8 (diff) |
Make gofer.dentry.destroyLocked idempotent
gofer operations accumulate dentries touched in a slice to call
checkCachingLocked on them when the operation is over. In case
the same dentry is touched multiple times during the operation,
checkCachingLocked, and consequently destroyLocked, may be called
more than once for the same dentry.
Updates #1198
PiperOrigin-RevId: 305276819
Diffstat (limited to 'pkg/sentry/fsimpl/gofer/BUILD')
-rw-r--r-- | pkg/sentry/fsimpl/gofer/BUILD | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/gofer/BUILD b/pkg/sentry/fsimpl/gofer/BUILD index d15a36709..99d1e3f8f 100644 --- a/pkg/sentry/fsimpl/gofer/BUILD +++ b/pkg/sentry/fsimpl/gofer/BUILD @@ -1,4 +1,4 @@ -load("//tools:defs.bzl", "go_library") +load("//tools:defs.bzl", "go_library", "go_test") load("//tools/go_generics:defs.bzl", "go_template_instance") licenses(["notice"]) @@ -54,3 +54,13 @@ go_library( "//pkg/usermem", ], ) + +go_test( + name = "gofer_test", + srcs = ["gofer_test.go"], + library = ":gofer", + deps = [ + "//pkg/p9", + "//pkg/sentry/contexttest", + ], +) |