Tommi Rantala
1948172fdb
selftests: pidfd: fix compilation errors due to wait.h
...
Drop unneeded <linux/wait.h> header inclusion to fix pidfd compilation
errors seen in Fedora 32:
In file included from pidfd_open_test.c:9:
../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant
17 | #define P_ALL 0
| ^
Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com >
Reviewed-by: Kees Cook <keescook@chromium.org >
Acked-by: Christian Brauner <christian.brauner@ubuntu.com >
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org >
2020-10-27 16:51:36 -06:00
Suren Baghdasaryan
2ec2f99abd
tests: move common definitions and functions into pidfd.h
...
Move definitions and functions used across different pidfd tests into
pidfd.h header.
Signed-off-by: Suren Baghdasaryan <surenb@google.com >
Reviewed-by: Christian Brauner <christian@brauner.io >
Link: https://lore.kernel.org/r/20190726162226.252750-1-surenb@google.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com >
2019-08-06 19:39:45 +02:00
Christian Brauner
172bb24a4f
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
2019-06-28 12:17:55 +02:00