Don't fail the mounter test because the kernel added options
On SELinux-enabled kernels, the kernel will helpfully add a "seclabel" option to mounted filesystems to indicate that labeling is supported. Don't let that break our tests. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
263351e912
commit
252bf574a0
|
|
@ -140,6 +140,7 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) {
|
|||
wantedVFS[opt] = struct{}{}
|
||||
}
|
||||
}
|
||||
volunteeredVFS := map[string]struct{}{"seclabel": {}}
|
||||
|
||||
mnts := make(map[int]*Info, len(info))
|
||||
for _, mi := range info {
|
||||
|
|
@ -199,7 +200,7 @@ func validateMount(t *testing.T, mnt string, opts, optional, vfs string) {
|
|||
if mi.VfsOpts != "" {
|
||||
for _, opt := range strings.Split(mi.VfsOpts, ",") {
|
||||
opt = clean(opt)
|
||||
if !has(wantedVFS, opt) {
|
||||
if !has(wantedVFS, opt) && !has(volunteeredVFS, opt) {
|
||||
t.Errorf("unexpected mount option %q expected %q", opt, vfs)
|
||||
}
|
||||
delete(wantedVFS, opt)
|
||||
|
|
|
|||
Loading…
Reference in New Issue