linux/tools
Sahaj Chaudhari 2ec5a07094
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>
2026-10-12 11:05:53 +02:00
..
accounting
arch - Remove the smp_locks alternatives machinery which was used to patch out lock 2026-08-18 18:11:25 -07:00
bootconfig Bootconfig updates for v7.3: 2026-08-25 08:59:09 -07:00
bpf perf tools updates for v7.3 2026-08-22 08:47:50 -07:00
build perf build: Remove leftover feature tests for removed cxx and clang support 2026-08-12 06:17:49 -07:00
certs
cgroup
counter
crypto
debugging
dma
docs doc tools: fix 'path' typos 2026-08-11 10:43:16 -06:00
firewire
firmware
gpio
hv
iio
include Including fixes from Bluetooth, IPSec and Netfilter. 2026-08-27 13:53:43 -07:00
kvm/kvm_stat
laptop
leds
lib More thermal control updates for 7.3-rc1 2026-08-26 14:21:30 -07:00
memory-model
mm mm.git review status for master..mm-nonmm-stable 2026-08-23 08:07:11 -07:00
net Including fixes from Bluetooth, IPSec and Netfilter. 2026-08-27 13:53:43 -07:00
objtool Rust fixes for v7.3 2026-08-30 09:47:39 -07:00
pcmcia
perf perf tools updates for v7.3 2026-08-22 08:47:50 -07:00
platform/x86/amd
power
rcu
sched
sched_ext sched_ext: Merge branch 'for-7.3-arena-args' into for-7.3 2026-08-17 11:20:34 -10:00
scripts perf tools updates for v7.3 2026-08-22 08:47:50 -07:00
sound
spi
testing selftests: pid_namespace: test fork with dead ancestor 2026-10-12 11:05:53 +02:00
thermal
time
tracing
unittests
usb
verification verification/rvgen: Use .old instead of .bak for kunit backup files 2026-08-25 13:56:53 +02:00
virtio tools/virtio: Fix control typo in trace agent comment 2026-08-19 06:38:48 -04:00
wmi
workqueue workqueue: allocate attrs for all workqueues 2026-08-10 11:47:20 -10:00
writeback
Makefile