]> git.baikalelectronics.ru Git - kernel.git/commit
tests: add pidfd_open() tests
authorChristian Brauner <christian@brauner.io>
Sat, 23 Mar 2019 11:24:21 +0000 (12:24 +0100)
committerChristian Brauner <christian@brauner.io>
Fri, 28 Jun 2019 10:17:55 +0000 (12:17 +0200)
commit8ee50bd959513e5b37c73242c9d56ef2e714edd9
tree4b8fa039326a0699ae1b6599e5e416c1399ab72b
parente0779a10d38d930fdb7b8f41018690b521e8db3d
tests: add pidfd_open() tests

This adds testing for the new pidfd_open() syscalls. Specifically, we test:
- that no invalid flags can be passed to pidfd_open()
- that no invalid pid can be passed to pidfd_open()
- that a pidfd can be retrieved with pidfd_open()
- that the retrieved pidfd references the correct pid

Signed-off-by: Christian Brauner <christian@brauner.io>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jann Horn <jannh@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.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: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-api@vger.kernel.org
tools/testing/selftests/pidfd/.gitignore
tools/testing/selftests/pidfd/Makefile
tools/testing/selftests/pidfd/pidfd.h [new file with mode: 0644]
tools/testing/selftests/pidfd/pidfd_open_test.c [new file with mode: 0644]
tools/testing/selftests/pidfd/pidfd_test.c