]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/pidfd: add tests for PIDFD_SELF_*
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Thu, 30 Jan 2025 20:40:30 +0000 (20:40 +0000)
committerChristian Brauner <brauner@kernel.org>
Wed, 5 Feb 2025 14:14:55 +0000 (15:14 +0100)
commit2bbf47f2d396ee32068042a99ecf4da955ce88ec
tree69986eb85dd05998de324a40d7693a2ee9074b0d
parente943271f7956e439e4c9ef3b7a13f7f00f6c9885
selftests/pidfd: add tests for PIDFD_SELF_*

Add tests to assert that PIDFD_SELF* correctly refers to the current
thread and process.

We explicitly test pidfd_send_signal(), however We defer testing of
mm-specific functionality which uses pidfd, namely process_madvise() and
process_mrelease() to mm testing (though note the latter can not be
sensibly tested as it would require the testing process to be dying).

We also correct the pidfd_open_test.c fields which refer to .request_mask
whereas the UAPI header refers to .mask, which otherwise break the import
of the UAPI header.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Link: https://lore.kernel.org/r/7ab0e48b26ba53abf7b703df2dd11a2e99b8efb2.1738268370.git.lorenzo.stoakes@oracle.com
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/pidfd/pidfd_open_test.c
tools/testing/selftests/pidfd/pidfd_test.c