diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-10-18 13:22:38 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-18 13:25:18 -0700 |
commit | 832c309ce95b5b68bdb4e98ac85dc64c6762646e (patch) | |
tree | 9cb06cdd96c288990df8516728ae2472ad7f3802 /runsc | |
parent | fb053829f9cad92527e7df93b17e211f5885a783 (diff) |
Change test to use VFS2
Updates #1035
PiperOrigin-RevId: 404043283
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/boot/fs.go | 2 | ||||
-rw-r--r-- | runsc/boot/loader_test.go | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go index ba5460f1c..ceeccf483 100644 --- a/runsc/boot/fs.go +++ b/runsc/boot/fs.go @@ -984,7 +984,7 @@ func (c *containerMounter) createRestoreEnvironment(conf *config.Config) (*fs.Re // Add root mount. fd := c.fds.remove() - opts := goferMountData(fd, conf.FileAccess, "/", false /* vfs2 */, false /* lisafs */) + opts := goferMountData(fd, conf.FileAccess, "/", conf.VFS2, false /* lisafs */) mf := fs.MountSourceFlags{} if c.root.Readonly || conf.Overlay { diff --git a/runsc/boot/loader_test.go b/runsc/boot/loader_test.go index ac6c26d25..eb56bc563 100644 --- a/runsc/boot/loader_test.go +++ b/runsc/boot/loader_test.go @@ -552,7 +552,7 @@ func TestRestoreEnvironment(t *testing.T) { { Dev: "9pfs-/", Flags: fs.MountSourceFlags{ReadOnly: true}, - DataString: "trans=fd,rfdno=0,wfdno=0,privateunixsocket=true", + DataString: "trans=fd,rfdno=0,wfdno=0", }, }, "tmpfs": { @@ -606,11 +606,11 @@ func TestRestoreEnvironment(t *testing.T) { { Dev: "9pfs-/", Flags: fs.MountSourceFlags{ReadOnly: true}, - DataString: "trans=fd,rfdno=0,wfdno=0,privateunixsocket=true", + DataString: "trans=fd,rfdno=0,wfdno=0", }, { Dev: "9pfs-/dev/fd-foo", - DataString: "trans=fd,rfdno=1,wfdno=1,privateunixsocket=true,cache=remote_revalidating", + DataString: "trans=fd,rfdno=1,wfdno=1,cache=remote_revalidating", }, }, "tmpfs": { @@ -664,7 +664,7 @@ func TestRestoreEnvironment(t *testing.T) { { Dev: "9pfs-/", Flags: fs.MountSourceFlags{ReadOnly: true}, - DataString: "trans=fd,rfdno=0,wfdno=0,privateunixsocket=true", + DataString: "trans=fd,rfdno=0,wfdno=0", }, }, "tmpfs": { @@ -704,6 +704,7 @@ func TestRestoreEnvironment(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { conf := testConfig() + conf.VFS2 = true var ioFDs []*fd.FD for _, ioFD := range tc.ioFDs { ioFDs = append(ioFDs, fd.New(ioFD)) @@ -713,7 +714,7 @@ func TestRestoreEnvironment(t *testing.T) { spec: tc.spec, goferFDs: ioFDs, } - mntr := newContainerMounter(&info, nil, &podMountHints{}, false /* vfs2Enabled */) + mntr := newContainerMounter(&info, nil, &podMountHints{}, conf.VFS2) actualRenv, err := mntr.createRestoreEnvironment(conf) if !tc.errorExpected && err != nil { t.Fatalf("could not create restore environment for test:%s", tc.name) |