I won't apply this version, please send v3 with the changes below.

On Mon, 16 Nov 2026 10:12:54 +0400, Mirian Shilakadze 
<[email protected]> wrote:
> +TEST_F(lock, not_recursive)
> +{
> +     ASSERT_EQ(0, mount(SRC, DST, NULL, MS_BIND, NULL));
> +     ASSERT_EQ(-1, setattr(AT_FDCWD, DST, AT_RECURSIVE,
> +                           MOUNT_ATTR_VE_LOCK, 0));
> +     EXPECT_EQ(EINVAL, errno);
> +}

Items 1-3 of the cover letter reply:

- Lock DST without AT_RECURSIVE first and expect 0.
- Skip when not root, without user namespaces, or when the kernel
  lacks the lock bits.
- Check that statmount() reports the locks lock_mnt_tree() raised.

A kernel without the feature fails this test with EINVAL too, the
unknown bits are refused before AT_RECURSIVE is looked at. That is one
of the two tests the cover letter counts as passing on the stock
kernel.

FIXTURE_SETUP(lock) only asserts, so a run without root fails in
unshare(CLONE_NEWNS), and in_ct() turns a missing user namespace or
missing feature into a failure. The sibling ve tests SKIP when
geteuid() is not 0.

Patch 2 says statmount() reports kernel-raised locks as well; a mount
copied into a new user and mount namespace shows them, and no test
looks at it.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to