]> git.baikalelectronics.ru Git - kernel.git/commit
tests: add waitid() tests for non-blocking pidfds
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 2 Sep 2020 10:21:30 +0000 (12:21 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 4 Sep 2020 11:48:57 +0000 (13:48 +0200)
commit52798e6df939b5327bf3febe0e564835ba5725ae
treef9b20216145fa8b214c9198510d558f97709bf07
parent05acac90c931bd2d1bf95ff5d1630ac093bf5f50
tests: add waitid() tests for non-blocking pidfds

Verify that the PIDFD_NONBLOCK flag works with pidfd_open() and that
waitid() with a non-blocking pidfd returns EAGAIN:

TAP version 13
1..3
# Starting 3 tests from 1 test cases.
#  RUN           global.wait_simple ...
#            OK  global.wait_simple
ok 1 global.wait_simple
#  RUN           global.wait_states ...
#            OK  global.wait_states
ok 2 global.wait_states
#  RUN           global.wait_nonblock ...
#            OK  global.wait_nonblock
ok 3 global.wait_nonblock
# PASSED: 3 / 3 tests passed.
# Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Link: https://lore.kernel.org/r/20200902102130.147672-5-christian.brauner@ubuntu.com
tools/testing/selftests/pidfd/pidfd.h
tools/testing/selftests/pidfd/pidfd_wait.c