diff options
Diffstat (limited to 'runsc/boot')
-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) |