]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/namespace: third threaded active reference count test
authorChristian Brauner <brauner@kernel.org>
Wed, 29 Oct 2025 12:21:22 +0000 (13:21 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 3 Nov 2025 16:41:24 +0000 (17:41 +0100)
commit80fedf8168ee82c30b343977901b6176cf1e0e76
tree5a9ef9d3559a43944c5bfcce708572db043fa79f
parentee861032381b6bf9188a84891ae7c31396e5dd2a
selftests/namespace: third threaded active reference count test

Test that namespaces become inactive after subprocess with multiple
threads exits. Create a subprocess that unshares user and network
namespaces, then creates two threads that share those namespaces. Verify
that after all threads and subprocess exit, the namespaces are no longer
listed by listns() and cannot be opened by open_by_handle_at().

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-69-2e6f823ebdc0@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/namespaces/ns_active_ref_test.c