Commit bb90a4c9 authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher

fuse: TestDirectMount: ignore `Optional` field

As evidenced by the test failures that are reported, the
`Optional` may change value between mounts. Ignore it
in the comparison.

 --- FAIL: TestDirectMount (0.14s)
    mount_linux_test.go:173: DirectMount effective mount options mismatch:
        DirectMount: mountinfo.Info{ID:0, Parent:0, Major:0, Minor:0, Root:"", Mountpoint:"", Options:"rw,nosuid,nodev,relatime", Optional:"shared:417", FSType:"fuse./tmp/go-build3776165", Source:"a,b", VFSOptions:"rw,user_id=1000,group_id=1000,max_read=131072"}
        fusermount:  mountinfo.Info{ID:0, Parent:0, Major:0, Minor:0, Root:"", Mountpoint:"", Options:"rw,nosuid,nodev,relatime", Optional:"shared:373", FSType:"fuse./tmp/go-build3776165", Source:"a,b", VFSOptions:"rw,user_id=1000,group_id=1000,max_read=131072"}

Fixes https://github.com/hanwen/go-fuse/issues/481

Change-Id: Ie8105cf4bec7e7f461267217860cbf36e47ed329
parent 028486bd
...@@ -138,7 +138,6 @@ func mountCheckOptions(t *testing.T, opts MountOptions) (info mountinfo.Info) { ...@@ -138,7 +138,6 @@ func mountCheckOptions(t *testing.T, opts MountOptions) (info mountinfo.Info) {
Source: orig.Source, Source: orig.Source,
FSType: orig.FSType, FSType: orig.FSType,
VFSOptions: orig.VFSOptions, VFSOptions: orig.VFSOptions,
Optional: orig.Optional,
} }
// server needs to run for Unmount to work // server needs to run for Unmount to work
go srv.Serve() go srv.Serve()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment