selftests/landlock: Add test to check rule tied to covered mount point
authorMickaël Salaün <mic@digikod.net>
Fri, 6 Jun 2025 11:08:09 +0000 (13:08 +0200)
committerMickaël Salaün <mic@digikod.net>
Thu, 19 Jun 2025 11:55:41 +0000 (13:55 +0200)
commitdae01387e6a9bbce31f6c62839733ab8b63e16f3
treee214d5642d8548ede63cc8a367c9687e58f9e56f
parentdc58130bc38f09b162aa3b216f8b8f1e0a56127b
selftests/landlock: Add test to check rule tied to covered mount point

This test checks that a rule on a directory used as a mount point does
not grant access to the mount covering it.  It is a generalization of
the bind mount case in layout3_fs.hostfs.release_inodes [1] that tests
hidden mount points.

Cc: Günther Noack <gnoack@google.com>
Cc: Song Liu <song@kernel.org>
Cc: Tingmao Wang <m@maowtm.org>
Link: https://lore.kernel.org/r/20250606.zo5aekae6Da6@digikod.net
Link: https://lore.kernel.org/r/20250606110811.211297-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/fs_test.c