summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/testutil.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-12-11 22:29:46 +0000
committergVisor bot <gvisor-bot@google.com>2019-12-11 22:29:46 +0000
commit0c5b3fd72793ffdeaa043c17e5b2a95d8b290626 (patch)
tree881c37f3ae3610350b0ec3a57e07044c25c2b893 /pkg/sentry/vfs/testutil.go
parent97aa9227305245fb9908e51e8b29cc677dafebd6 (diff)
parent481dbfa5ab24ec2c0752b9e748d3617285603c4e (diff)
Merge release-20191129.0-49-g481dbfa (automated)
Diffstat (limited to 'pkg/sentry/vfs/testutil.go')
-rwxr-xr-xpkg/sentry/vfs/testutil.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/testutil.go b/pkg/sentry/vfs/testutil.go
index 593144cb7..7a1d9e383 100755
--- a/pkg/sentry/vfs/testutil.go
+++ b/pkg/sentry/vfs/testutil.go
@@ -15,7 +15,10 @@
package vfs
import (
+ "fmt"
+
"gvisor.dev/gvisor/pkg/abi/linux"
+ "gvisor.dev/gvisor/pkg/fspath"
"gvisor.dev/gvisor/pkg/sentry/context"
"gvisor.dev/gvisor/pkg/sentry/kernel/auth"
"gvisor.dev/gvisor/pkg/syserror"
@@ -114,6 +117,12 @@ func (fs *FDTestFilesystem) UnlinkAt(ctx context.Context, rp *ResolvingPath) err
return syserror.EPERM
}
+// PrependPath implements FilesystemImpl.PrependPath.
+func (fs *FDTestFilesystem) PrependPath(ctx context.Context, vfsroot, vd VirtualDentry, b *fspath.Builder) error {
+ b.PrependComponent(fmt.Sprintf("vfs.fdTestDentry:%p", vd.dentry.impl.(*fdTestDentry)))
+ return PrependPathSyntheticError{}
+}
+
type fdTestDentry struct {
vfsd Dentry
}