]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/landlock: Add layout1.umount_sandboxer tests
authorMickaël Salaün <mic@digikod.net>
Wed, 8 Jan 2025 15:43:30 +0000 (16:43 +0100)
committerMickaël Salaün <mic@digikod.net>
Fri, 17 Jan 2025 18:05:38 +0000 (19:05 +0100)
commit2a794ee613617b5d8fd978b7ef08d64aa07ff2e6
tree9e38acd1352ea2a5ae06af4d644a724d38605d25
parent5147779d5e1b6425f30eb57071717be2bb65fa3b
selftests/landlock: Add layout1.umount_sandboxer tests

Check that a domain is not tied to the executable file that created it.
For instance, that could happen if a Landlock domain took a reference to
a struct path.

Move global path names to common.h and replace copy_binary() with a more
generic copy_file() helper.

Test coverage for security/landlock is 92.7% of 1133 lines according to
gcc/gcov-14.

Cc: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20250108154338.1129069-23-mic@digikod.net
[mic: Update date and add test coverage]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/Makefile
tools/testing/selftests/landlock/common.h
tools/testing/selftests/landlock/fs_test.c
tools/testing/selftests/landlock/sandbox-and-launch.c [new file with mode: 0644]
tools/testing/selftests/landlock/wait-pipe.c [new file with mode: 0644]