linux/tools/testing/selftests/landlock
Mickaël Salaün 35ca423992
selftests/landlock: Add hostfs tests
Add tests for the hostfs filesystems to make sure it has a consistent
inode management, which is required for Landlock's file hierarchy
identification.  This adds 5 new tests for layout3_fs with the hostfs
variant.

Add hostfs to the new (architecture-specific) config.um file.

The hostfs filesystem, only available for an User-Mode Linux kernel, is
special because we cannot explicitly mount it.  The layout3_fs.hostfs
variant tests are skipped if the current test directory is not backed by
this filesystem.

The layout3_fs.hostfs.tag_inode_dir_child and
layout3_fs.hostfs.tag_inode_file tests pass thanks to a previous commit
fixing hostfs inode management.  Without this fix, the deny-by-default
policy would apply and all access requests would be denied.

Link: https://lore.kernel.org/r/20230612191430.339153-7-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2023-06-12 21:26:23 +02:00
..
.gitignore
base_test.c selftests/landlock: Test FD passing from restricted to unrestricted processes 2022-10-19 09:01:46 +02:00
common.h selftests/landlock: Test FD passing from restricted to unrestricted processes 2022-10-19 09:01:46 +02:00
config selftests/landlock: Add tests for pseudo filesystems 2023-06-12 21:26:23 +02:00
config.um selftests/landlock: Add hostfs tests 2023-06-12 21:26:23 +02:00
fs_test.c selftests/landlock: Add hostfs tests 2023-06-12 21:26:23 +02:00
Makefile selftests/landlock: Build without static libraries 2022-10-19 22:10:56 +02:00
ptrace_test.c selftests/landlock: Test ptrace as much as possible with Yama 2023-01-27 18:53:55 +01:00
true.c