mount: make seclabel optional in tests#36740
Conversation
Signed-off-by: Tonis Tiigi <[email protected]>
|
confirmed this passes in rhel ci: https://jenkins.dockerproject.org/job/Tonis%20Docker%20debugginig/145/ |
|
LGTM |
As a second thought, I don't think this test case should check the presence of |
|
@kolyshkin Is there a case when it is not added when selinux is enabled and mounted? If not, it could help us catch cases where we break the selinux detection code. |
Well, adding the |
|
Having said that, the above is not a very strong opinion so I'm fine with either approach. |
|
@kolyshkin Going for contrived examples, it is also possible the |
|
ping @kolyshkin PTAL |
|
This one can be closed as #36750 is merged |
|
Thanks! Closing |
The current test always assumes that seclabel appears on mounts if and only if selinux is enabled. The
selinux.IsEnabled()checks ifselinuxfsis enabled, so in systems that support selinux but don't have this mount (for example dind) this test would fail. The exception is added so that extraseclabeloption is allowed but if selinuxfs is present it is still required.Signed-off-by: Tonis Tiigi [email protected]