aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/pidfd/.gitignore
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2019-07-26 09:22:26 -0700
committerChristian Brauner <christian.brauner@ubuntu.com>2019-08-06 19:52:41 +0200
commitaed5a8df3dbbd804409d40f821e0768891cfd5ab (patch)
tree3a3b1c235554ebed6f5ccfa5fd64b272d036888d /tools/testing/selftests/pidfd/.gitignore
parenttests: move common definitions and functions into pidfd.h (diff)
downloadlinux-dev-aed5a8df3dbbd804409d40f821e0768891cfd5ab.tar.xz
linux-dev-aed5a8df3dbbd804409d40f821e0768891cfd5ab.zip
tests: add pidfd poll tests
This adds testing for polling on pidfd of a process being killed. Test runs 10000 iterations by default to stress test pidfd polling functionality. It accepts an optional command-line parameter to override the number or iterations to run. Specifically, it tests for: - pidfd_open on a child process succeeds - pidfd_send_signal on a child process succeeds - polling on pidfd succeeds and returns exactly one event - returned event is POLLIN - event is received within 3 secs of the process being killed 10000 iterations was chosen because of the race condition being tested which is not consistently reproducible but usually is revealed after less than 2000 iterations. Reveals race fixed by commit b191d6491be6 ("pidfd: fix a poll race when setting exit_state") Signed-off-by: Suren Baghdasaryan <surenb@google.com> Link: https://lore.kernel.org/r/20190726162226.252750-2-surenb@google.com Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'tools/testing/selftests/pidfd/.gitignore')
-rw-r--r--tools/testing/selftests/pidfd/.gitignore1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/pidfd/.gitignore b/tools/testing/selftests/pidfd/.gitignore
index 730ef9dc08cc..8d069490e17b 100644
--- a/tools/testing/selftests/pidfd/.gitignore
+++ b/tools/testing/selftests/pidfd/.gitignore
@@ -1,3 +1,4 @@
pidfd_open_test
+pidfd_poll_test
pidfd_test
pidfd_wait