aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/pidfd/pidfd_setns_test.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.cTommi Rantala1-1/+0
kcmp is not used in pidfd_setns_test.c, so do not include <linux/kcmp.h> Signed-off-by: Tommi Rantala <[email protected]> Acked-by: Christian Brauner <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-10-08selftests/clone3: Avoid OS-defined clone_argsKees Cook1-1/+1
As the UAPI headers start to appear in distros, we need to avoid outdated versions of struct clone_args to be able to test modern features, named "struct __clone_args". Additionally update the struct size macro names to match UAPI names. Acked-by: Christian Brauner <[email protected]> Link: https://lore.kernel.org/lkml/20200921075432.u4gis3s2o5qrsb5g@wittgenstein/ Signed-off-by: Kees Cook <[email protected]>
2020-08-05Merge tag 'linux-kselftest-5.9-rc1' of ↵Linus Torvalds1-1/+0
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates form Shuah Khan: - TAP output reporting related fixes from Paolo Bonzini and Kees Cook. These fixes make it skip reporting consistent with TAP format. - Cleanup fixes to framework run_tests from Yauheni Kaliuta * tag 'linux-kselftest-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (23 commits) selftests/harness: Limit step counter reporting selftests/seccomp: Check ENOSYS under tracing selftests/seccomp: Refactor to use fixture variants selftests/harness: Clean up kern-doc for fixtures selftests: kmod: Add module address visibility test Replace HTTP links with HTTPS ones: KMOD KERNEL MODULE LOADER - USERMODE HELPER selftests: fix condition in run_tests selftests: do not use .ONESHELL selftests: pidfd: skip test if unshare fails with EPERM selftests: pidfd: do not use ksft_exit_skip after ksft_set_plan selftests/harness: Report skip reason selftests/harness: Display signed values correctly selftests/harness: Refactor XFAIL into SKIP selftests/harness: Switch to TAP output selftests: Add header documentation and helpers selftests/binderfs: Fix harness API usage selftests: Remove unneeded selftest API headers selftests/clone3: Reorder reporting output selftests: sync_test: do not use ksft_exit_skip after ksft_set_plan selftests: sigaltstack: do not use ksft_exit_skip after ksft_set_plan ...
2020-07-08tests: add CLONE_NEWTIME setns testsChristian Brauner1-0/+76
Now that pidfds support CLONE_NEWTIME as well enable testing them in the setns() testuite. Signed-off-by: Christian Brauner <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: Dmitry Safonov <[email protected]> Cc: Andrei Vagin <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-07-06selftests: Remove unneeded selftest API headersKees Cook1-1/+0
Remove unused includes of the kselftest.h header. Acked-by: Christian Brauner <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-06-17tests: test for setns() EINVAL regressionChristian Brauner1-0/+12
Verify that setns() reports EINVAL when an fd is passed that refers to an open file but the file is not a file descriptor useable to interact with namespaces. Cc: Jan Stancek <[email protected]> Cc: Cyril Hrubis <[email protected]> Link: https://lore.kernel.org/lkml/20200615085836.GR12456@shao2-debian Signed-off-by: Christian Brauner <[email protected]>
2020-05-13selftests/pidfd: add pidfd setns testsChristian Brauner1-0/+473
This is basically a test-suite for setns() and as of now contains: - test that we can't pass garbage flags - test that we can't attach to the namespaces of task that has already exited - test that we can incrementally setns into all namespaces of a target task using a pidfd - test that we can setns atomically into all namespaces of a target task - test that we can't cross setns into a user namespace outside of our user namespace hierarchy - test that we can't setns into namespaces owned by user namespaces over which we are not privileged Signed-off-by: Christian Brauner <[email protected]> Link: https://lore.kernel.org/r/[email protected]