diff --git a/mount/go.mod b/mount/go.mod index f0f46448..749327a2 100644 --- a/mount/go.mod +++ b/mount/go.mod @@ -3,6 +3,6 @@ module github.com/moby/sys/mount go 1.14 require ( - github.com/moby/sys/mountinfo v0.1.0 + github.com/moby/sys/mountinfo v0.3.1 golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 ) diff --git a/mount/go.sum b/mount/go.sum index 729e4354..53e9f138 100644 --- a/mount/go.sum +++ b/mount/go.sum @@ -1,4 +1,5 @@ -github.com/moby/sys/mountinfo v0.1.0 h1:r8vMRbMAFEAfiNptYVokP+nfxPJzvRuia5e2vzXtENo= -github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/moby/sys/mountinfo v0.3.1 h1:R+C9GycEzoR3GdwQ7mANRhJORnVDJiRkf0JMY82MeI0= +github.com/moby/sys/mountinfo v0.3.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 h1:YEu4SMq7D0cmT7CBbXfcH0NZeuChAXwsHe/9XueUO6o= golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/mount/mounter_linux_test.go b/mount/mounter_linux_test.go index 3dbcb77a..92f6a44c 100644 --- a/mount/mounter_linux_test.go +++ b/mount/mounter_linux_test.go @@ -154,8 +154,8 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) { // Use parent info as the defaults p := mnts[mi.Parent] pOpts := make(map[string]struct{}) - if p.Opts != "" { - for _, opt := range strings.Split(p.Opts, ",") { + if p.Options != "" { + for _, opt := range strings.Split(p.Options, ",") { pOpts[clean(opt)] = struct{}{} } } @@ -166,9 +166,9 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) { } } - // Validate Opts - if mi.Opts != "" { - for _, opt := range strings.Split(mi.Opts, ",") { + // Validate Options + if mi.Options != "" { + for _, opt := range strings.Split(mi.Options, ",") { opt = clean(opt) if !has(wantedOpts, opt) && !has(pOpts, opt) && opt != "relatime" { t.Errorf("unexpected mount option %q, expected %q", opt, opts) @@ -177,7 +177,7 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) { } } for opt := range wantedOpts { - t.Errorf("missing mount option %q, found %q", opt, mi.Opts) + t.Errorf("missing mount option %q, found %q", opt, mi.Options) } // Validate Optional @@ -196,8 +196,8 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) { // Validate VFS if set if vfs != "" { - if mi.VfsOpts != "" { - for _, opt := range strings.Split(mi.VfsOpts, ",") { + if mi.VFSOptions != "" { + for _, opt := range strings.Split(mi.VFSOptions, ",") { opt = clean(opt) if !has(wantedVFS, opt) && opt != "seclabel" { // can be added by selinux t.Errorf("unexpected vfs option %q, expected %q", opt, vfs) @@ -206,7 +206,7 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) { } } for opt := range wantedVFS { - t.Errorf("missing vfs option %q, found %q", opt, mi.VfsOpts) + t.Errorf("missing vfs option %q, found %q", opt, mi.VFSOptions) } }