summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorSahaj Chaudhari <sahaj123.sc@gmail.com>2026-10-07 17:19:14 +0530
committerChristian Brauner <brauner@kernel.org>2026-10-12 11:05:53 +0200
commit2ec5a070946165c66b4ee1190016d5a8e44dc055 (patch)
tree631a006c72f19b1a7576bf7921806cc6ef9de54a /tools/lib/python
parent41e24dc80739b07d592566ceeaf0bb5e3620cc5c (diff)
downloadlinux-next-2ec5a070946165c66b4ee1190016d5a8e44dc055.tar.gz
linux-next-2ec5a070946165c66b4ee1190016d5a8e44dc055.zip
selftests: pid_namespace: test fork with dead ancestor
Add a regression test for fork() into a PID namespace whose parent namespace has lost its init process. Since the kernel cannot assign the new process a PID in that dead ancestor, fork() must fail with ENOMEM. Create the nested PID namespaces, keep the child namespace handle open after its init process exits, then enter it and verify fork() fails. Register the test with the PID namespace selftests and ignore its generated binary. Skip when namespace operations are denied or procfs cannot provide the pid_for_children handle. Signed-off-by: Sahaj Chaudhari <sahaj123.sc@gmail.com> Link: https://patch.msgid.link/20261007114914.1668934-1-sahaj123.sc@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions