• Christian Brauner's avatar
    pidfd: add pidfd_wait tests · e63f3085
    Christian Brauner authored
    Add tests for pidfd_wait() and CLONE_WAIT_PID:
    - test that waitid(P_PIDFD) fails on /proc/<pid>
    - test that waitid(P_PIDFD) fails on /dev/null
    - test that waitid(P_PIDFD) can wait on a pidfd
    - test that waitid(P_PIDFD) can wait on a pidfd and return siginfo_t
    - test that waitid(P_PIDFD) works with WEXITED
    - test that waitid(P_PIDFD) works with WSTOPPED
    - test that waitid(P_PIDFD) works with WUNTRACED
    - test that waitid(P_PIDFD) works with WCONTINUED
    - test that waitid(P_PIDFD) works with WNOWAIT
    - test that waitid(P_PIDFD)works with WNOHANG
    Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: David Howells <dhowells@redhat.com>
    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: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Link: https://lore.kernel.org/r/20190727222229.6516-3-christian@brauner.io
    e63f3085
pidfd_wait.c 8.11 KB