linux/tools/testing/selftests/namespaces
Ricardo B. Marlière 2509bdc8a4
selftests/namespaces: Skip efault tests when listns() is not available
When listns() is not implemented the iterator child detects ENOSYS and
exits cleanly with status PIDFD_SKIP before the parent has a chance to
signal it.  The parent sends SIGKILL (which is a harmless no-op at that
point) and then calls waitpid(), obtaining a normal-exit status.  The
subsequent ASSERT_TRUE(WIFSIGNALED(status)) therefore fails, causing the
three EFAULT-focused tests to report FAIL rather than SKIP on kernels that
do not yet carry listns() support.

After collecting the iterator's exit status, check whether it exited with
PIDFD_SKIP and issue a SKIP verdict in that case, consistent with the
behaviour of every other listns test that already handles ENOSYS correctly.

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
Link: https://patch.msgid.link/20260407-selftests-namespaces_fixes-v1-3-59109909d88b@suse.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-05-11 12:25:32 +02:00
..
.gitignore selftests/namespaces: test for efault 2025-11-10 15:53:56 +01:00
config
cred_change_test.c selftests/namespace: commit_creds() active reference tests 2025-11-03 17:41:24 +01:00
file_handle_test.c selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
init_ino_test.c selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
listns_efault_test.c selftests/namespaces: Skip efault tests when listns() is not available 2026-05-11 12:25:32 +02:00
listns_pagination_bug.c selftests/namespace: test listns() pagination 2025-11-03 17:41:25 +01:00
listns_permissions_test.c selftests/namespaces: seventh listns() permission test 2025-11-03 17:41:22 +01:00
listns_test.c selftests/namespaces: ninth listns() test 2025-11-03 17:41:21 +01:00
Makefile selftests/namespaces: test for efault 2025-11-10 15:53:56 +01:00
ns_active_ref_test.c selftests/namespace: third threaded active reference count test 2025-11-03 17:41:24 +01:00
nsid_test.c selftests/namespaces: Kill grandchild in nsid fixture teardown 2026-05-11 12:25:31 +02:00
regression_pidfd_setns_test.c selftests/namespaces: add active reference count regression test 2025-11-10 10:20:54 +01:00
siocgskns_test.c selftests/namespaces: twelth inactive namespace resurrection test 2025-11-03 17:41:24 +01:00
stress_test.c selftests/namespace: add stress test 2025-11-03 17:41:25 +01:00
wrappers.h selftests/namespaces: add listns() wrapper 2025-11-03 17:41:20 +01:00