]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
selftests/landlock: Add PID tests for audit records
authorMickaël Salaün <mic@digikod.net>
Thu, 10 Apr 2025 17:17:23 +0000 (19:17 +0200)
committerMickaël Salaün <mic@digikod.net>
Fri, 11 Apr 2025 10:53:22 +0000 (12:53 +0200)
commit6b4566400a2919e6c1137404c53d7cf1ada559aa
tree85cd24c8c253bcf0abd31818b899431f5cf050bf
parente4a0f9e0cacd93094b619616426a273e0bc9107e
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>
tools/testing/selftests/landlock/audit.h
tools/testing/selftests/landlock/audit_test.c
tools/testing/selftests/landlock/fs_test.c