summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/mock.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/mock.go')
-rw-r--r--pkg/sentry/fs/mock.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/fs/mock.go b/pkg/sentry/fs/mock.go
index b3c4ad80b..7a24c6f1b 100644
--- a/pkg/sentry/fs/mock.go
+++ b/pkg/sentry/fs/mock.go
@@ -75,6 +75,12 @@ func (n *MockMountSourceOps) Keep(dirent *Dirent) bool {
return n.keep
}
+// CacheReaddir implements fs.MountSourceOperations.CacheReaddir.
+func (n *MockMountSourceOps) CacheReaddir() bool {
+ // Common case: cache readdir results if there is a dirent cache.
+ return n.keep
+}
+
// WriteOut implements fs.InodeOperations.WriteOut.
func (n *MockInodeOperations) WriteOut(context.Context, *Inode) error {
return nil