diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-05-04 14:33:53 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-04 14:36:06 -0700 |
commit | 95df852bf283bf5eb173cc92b14d487b2367a8a7 (patch) | |
tree | d1e0aad3062e642ecda38cbb0d69007b607695dd /runsc/boot/fs_test.go | |
parent | dd3875eabecc479d83cb66828a4163c37458170e (diff) |
Make Mount.Type optional for bind mounts
According to the OCI spec Mount.Type is an optional field and it
defaults to "bind" when any of "bind" or "rbind" is included in
Mount.Options.
Also fix the shim to remove bind/rbind from options when mount is
converted from bind to tmpfs inside the Sentry.
Fixes #2330
Fixes #3274
PiperOrigin-RevId: 371996891
Diffstat (limited to 'runsc/boot/fs_test.go')
-rw-r--r-- | runsc/boot/fs_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/boot/fs_test.go b/runsc/boot/fs_test.go index b4f12d034..09ffda628 100644 --- a/runsc/boot/fs_test.go +++ b/runsc/boot/fs_test.go @@ -244,7 +244,7 @@ func TestGetMountAccessType(t *testing.T) { } mounter := containerMounter{hints: podHints} conf := &config.Config{FileAccessMounts: config.FileAccessShared} - if got := mounter.getMountAccessType(conf, specs.Mount{Source: source}); got != tst.want { + if got := mounter.getMountAccessType(conf, &specs.Mount{Source: source}); got != tst.want { t.Errorf("getMountAccessType(), want: %v, got: %v", tst.want, got) } }) |