mirror-linux/tools/testing/selftests/landlock
Mickaël Salaün 6b4566400a
selftests/landlock: Add PID tests for audit records
Add audit.thread tests to check that the PID tied to a domain is not a
thread ID but the thread group ID.  These new tests would not pass
without the previous TGID fix.

Extend matches_log_domain_allocated() to check against the PID that
created the domain.

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

Cc: Christian Brauner <brauner@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/20250410171725.1265860-3-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2025-04-11 12:53:22 +02:00
..
.gitignore selftests/landlock: Test audit with restrict flags 2025-03-26 13:59:46 +01:00
Makefile selftests/landlock: Test audit with restrict flags 2025-03-26 13:59:46 +01:00
audit.h selftests/landlock: Add PID tests for audit records 2025-04-11 12:53:22 +02:00
audit_test.c selftests/landlock: Add PID tests for audit records 2025-04-11 12:53:22 +02:00
base_test.c selftests/landlock: Extend tests for landlock_restrict_self(2)'s flags 2025-03-26 13:59:45 +01:00
common.h selftests/landlock: Add audit tests for filesystem 2025-03-26 13:59:48 +01:00
config selftests/landlock: Add tests for audit flags and domain IDs 2025-03-26 13:59:45 +01:00
config.um selftests/landlock: Add hostfs tests 2023-06-12 21:26:23 +02:00
fs_test.c selftests/landlock: Add PID tests for audit records 2025-04-11 12:53:22 +02:00
net_test.c selftests/landlock: Add audit tests for network 2025-03-26 13:59:48 +01:00
ptrace_test.c selftests/landlock: Add audit tests for ptrace 2025-03-26 13:59:47 +01:00
sandbox-and-launch.c selftests/landlock: Add layout1.umount_sandboxer tests 2025-01-17 19:05:38 +01:00
scoped_abstract_unix_test.c selftests/landlock: Add audit tests for abstract UNIX socket scoping 2025-03-26 13:59:47 +01:00
scoped_base_variants.h selftests/landlock: Test abstract UNIX socket scoping 2024-09-16 23:50:48 +02:00
scoped_common.h selftests/landlock: Test abstract UNIX socket scoping 2024-09-16 23:50:48 +02:00
scoped_multiple_domain_variants.h selftests/landlock: Test abstract UNIX socket scoping 2024-09-16 23:50:48 +02:00
scoped_signal_test.c selftests/landlock: Add a new test for setuid() 2025-03-26 13:59:32 +01:00
scoped_test.c landlock: Add signal scoping 2024-09-16 23:50:52 +02:00
true.c
wait-pipe-sandbox.c selftests/landlock: Test audit with restrict flags 2025-03-26 13:59:46 +01:00
wait-pipe.c selftests/landlock: Add layout1.umount_sandboxer tests 2025-01-17 19:05:38 +01:00
wrappers.h selftests/landlock: Add wrappers.h 2025-01-17 19:05:38 +01:00