linux-yocto/tools/testing
Isaac J. Manjarres 6a75f19af1 selftests/memfd: run sysctl tests when PID namespace support is enabled
The sysctl tests for vm.memfd_noexec rely on the kernel to support PID
namespaces (i.e.  the kernel is built with CONFIG_PID_NS=y).  If the
kernel the test runs on does not support PID namespaces, the first sysctl
test will fail when attempting to spawn a new thread in a new PID
namespace, abort the test, preventing the remaining tests from being run.

This is not desirable, as not all kernels need PID namespaces, but can
still use the other features provided by memfd.  Therefore, only run the
sysctl tests if the kernel supports PID namespaces.  Otherwise, skip those
tests and emit an informative message to let the user know why the sysctl
tests are not being run.

Link: https://lkml.kernel.org/r/20241205192943.3228757-1-isaacmanjarres@google.com
Fixes: 11f75a0144 ("selftests/memfd: add tests for MFD_NOEXEC_SEAL MFD_EXEC")
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
Reviewed-by: Jeff Xu <jeffxu@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: <stable@vger.kernel.org>	[6.6+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-12-18 19:04:41 -08:00
..
crypto/chacha20-s390
cxl module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fault-injection
ktest
kunit kunit: qemu_configs: loongarch: Enable shutdown 2024-11-19 15:26:30 -07:00
memblock
nvdimm Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
radix-tree maple_tree: add some alloc node test case 2024-11-06 20:11:13 -08:00
scatterlist
selftests selftests/memfd: run sysctl tests when PID namespace support is enabled 2024-12-18 19:04:41 -08:00
shared - The series "resource: A couple of cleanups" from Andy Shevchenko 2024-11-25 16:09:48 -08:00
vma tools: testing: add additional vma_internal.h stubs 2024-11-06 20:11:19 -08:00
vsock vsock/test: verify socket options after setting them 2024-12-05 11:39:34 +01:00