On Tue, Sep 7, 2021 at 4:20 AM Li Wang <liwang@redhat.com> wrote:


On Mon, Sep 6, 2021 at 4:36 PM Jan Stancek <jstancek@redhat.com> wrote:
commit f7e33bdbd6d1 ("fs: remove mandatory file locking support")
removed mandatory file locking support, but mount option
is still allowed and produces no error. There's a warning
in dmesg but it's pr_warn_once() so we can't rely to always
find it there.

Make the test check also for CONFIG_MANDATORY_FILE_LOCKING=y.

I'm wondering, if the SUT without CONFIG_MANDATORY_FILE_LOCKING
enabling, why the mount-check in setup() didn't report EPERM?

Because kernel commit f7e33bdbd6d1 removed that code, it generates
warning message instead.
 

And, should we drop the mount-check for EPERM from setup after adding
this .needs_kconfigs?

I'd keep it, it doesn't hurt anything and older kernels could get EPERM
for other reason (like running test in namespace where you don't have CAP_SYS_ADMIN)

 

--
Regards,
Li Wang