summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/mounts_test.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2019-06-13 18:39:43 -0700
committerShentubot <shentubot@google.com>2019-06-13 18:40:38 -0700
commit3e9b8ecbfe21ba6c8c788be469fc6cea6a4a40b7 (patch)
tree8a1b2a0e64c013503ff30bf4b49b28764db52680 /pkg/sentry/fs/mounts_test.go
parent0a5ee6f7b20ef4f5533766d753b85005f79ae613 (diff)
Plumb context through more layers of filesytem.
All functions which allocate objects containing AtomicRefCounts will soon need a context. PiperOrigin-RevId: 253147709
Diffstat (limited to 'pkg/sentry/fs/mounts_test.go')
-rw-r--r--pkg/sentry/fs/mounts_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/fs/mounts_test.go b/pkg/sentry/fs/mounts_test.go
index 764318895..c4c771f2c 100644
--- a/pkg/sentry/fs/mounts_test.go
+++ b/pkg/sentry/fs/mounts_test.go
@@ -30,17 +30,17 @@ import (
// |-bar (file)
func createMountNamespace(ctx context.Context) (*fs.MountNamespace, error) {
perms := fs.FilePermsFromMode(0777)
- m := fs.NewPseudoMountSource()
+ m := fs.NewPseudoMountSource(ctx)
barFile := fsutil.NewSimpleFileInode(ctx, fs.RootOwner, perms, 0)
fooDir := ramfs.NewDir(ctx, map[string]*fs.Inode{
- "bar": fs.NewInode(barFile, m, fs.StableAttr{Type: fs.RegularFile}),
+ "bar": fs.NewInode(ctx, barFile, m, fs.StableAttr{Type: fs.RegularFile}),
}, fs.RootOwner, perms)
rootDir := ramfs.NewDir(ctx, map[string]*fs.Inode{
- "foo": fs.NewInode(fooDir, m, fs.StableAttr{Type: fs.Directory}),
+ "foo": fs.NewInode(ctx, fooDir, m, fs.StableAttr{Type: fs.Directory}),
}, fs.RootOwner, perms)
- return fs.NewMountNamespace(ctx, fs.NewInode(rootDir, m, fs.StableAttr{Type: fs.Directory}))
+ return fs.NewMountNamespace(ctx, fs.NewInode(ctx, rootDir, m, fs.StableAttr{Type: fs.Directory}))
}
func TestFindLink(t *testing.T) {