aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/pidfd/pidfd_getfd_test.c
diff options
context:
space:
mode:
authorChristian Brauner <christian.brauner@ubuntu.com>2020-06-17 00:48:54 +0200
committerChristian Brauner <christian.brauner@ubuntu.com>2020-06-17 00:48:54 +0200
commit86f56395feb2b106b125c47e72192e37da5dd088 (patch)
treea63cde19caa1c5ebe0d436d836bc464f4c25b238 /tools/testing/selftests/pidfd/pidfd_getfd_test.c
parentnsproxy: restore EINVAL for non-namespace file descriptor (diff)
downloadlinux-dev-86f56395feb2b106b125c47e72192e37da5dd088.tar.xz
linux-dev-86f56395feb2b106b125c47e72192e37da5dd088.zip
tests: test for setns() EINVAL regression
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 <jstancek@redhat.com> Cc: Cyril Hrubis <chrubis@suse.cz> Link: https://lore.kernel.org/lkml/20200615085836.GR12456@shao2-debian Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'tools/testing/selftests/pidfd/pidfd_getfd_test.c')
-rw-r--r--tools/testing/selftests/pidfd/pidfd_getfd_test.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/tools/testing/selftests/pidfd/pidfd_getfd_test.c b/tools/testing/selftests/pidfd/pidfd_getfd_test.c
index 401a7c1d0312..84b65ecccb04 100644
--- a/tools/testing/selftests/pidfd/pidfd_getfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_getfd_test.c
@@ -34,11 +34,6 @@ static int sys_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1,
return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
}
-static int sys_memfd_create(const char *name, unsigned int flags)
-{
- return syscall(__NR_memfd_create, name, flags);
-}
-
static int __child(int sk, int memfd)
{
int ret;