pidfd: add polling selftests

Other than verifying pidfd based polling, the tests make sure that
wait semantics are preserved with the pidfd poll. Notably the 2 cases:
1. If a thread group leader exits while threads still there, then no
   pidfd poll notifcation should happen.
2. If a non-thread group leader does an execve, then the thread group
   leader is signaled to exit and is replaced with the execing thread
   as the new leader, however the parent is not notified in this case.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Christian Brauner <christian@brauner.io>
This commit is contained in:
Joel Fernandes (Google) 2019-04-30 12:21:54 -04:00 • committed by Christian Brauner
commit 740378dc78
No known key found for this signature in database
GPG key ID: 8EB056D53EECB12D
2 changed files with 211 additions and 1 deletions