aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/pidfd/Makefile
diff options
context:
space:
mode:
authorChristian Brauner <christian@brauner.io>2018-12-29 22:27:33 +0100
committerChristian Brauner <christian@brauner.io>2019-03-05 17:04:33 +0100
commit575a0ae9744d571f7c6aae4487a05850baae9e1c (patch)
tree1a0a89a61e0db7064fa195b23947e1baa86b63f0 /tools/testing/selftests/pidfd/Makefile
parentsignal: add pidfd_send_signal() syscall (diff)
downloadlinux-dev-575a0ae9744d571f7c6aae4487a05850baae9e1c.tar.xz
linux-dev-575a0ae9744d571f7c6aae4487a05850baae9e1c.zip
selftests: add tests for pidfd_send_signal()
As suggested by Andrew Morton in [1] add selftests for the new sys_pidfd_send_signal() syscall: /* test_pidfd_send_signal_syscall_support */ Test whether the pidfd_send_signal() syscall is supported and the tests can be run or need to be skipped. /* test_pidfd_send_signal_simple_success */ Test whether sending a signal via a pidfd works. /* test_pidfd_send_signal_exited_fail */ Verify that sending a signal to an already exited process fails with ESRCH. /* test_pidfd_send_signal_recycled_pid_fail */ Verify that a recycled pid cannot be signaled via a pidfd referring to an already exited process that had the same pid (cf. [2], [3]). [1]: https://lore.kernel.org/lkml/20181228152012.dbf0508c2508138efc5f2bbe@linux-foundation.org/ [2]: https://lore.kernel.org/lkml/20181230210245.GA30252@mail.hallyn.com/ [3]: https://lore.kernel.org/lkml/20181230232711.7aayb7vnhogbv4co@brauner.io/ Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Kees Cook <keescook@chromium.org> Cc: Jann Horn <jannh@google.com> Cc: Andy Lutomirsky <luto@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Aleksa Sarai <cyphar@cyphar.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Florian Weimer <fweimer@redhat.com> Signed-off-by: Christian Brauner <christian@brauner.io> Reviewed-by: Tycho Andersen <tycho@tycho.ws> Acked-by: Serge Hallyn <serge@hallyn.com>
Diffstat (limited to 'tools/testing/selftests/pidfd/Makefile')
-rw-r--r--tools/testing/selftests/pidfd/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/pidfd/Makefile b/tools/testing/selftests/pidfd/Makefile
new file mode 100644
index 000000000000..deaf8073bc06
--- /dev/null
+++ b/tools/testing/selftests/pidfd/Makefile
@@ -0,0 +1,6 @@
+CFLAGS += -g -I../../../../usr/include/
+
+TEST_GEN_PROGS := pidfd_test
+
+include ../lib.mk
+