Home
last modified time | relevance | path

Searched refs:nsfd (Results 1 – 9 of 9) sorted by relevance

/linux-6.1.9/tools/testing/selftests/proc/
Dsetns-dcache.c49 int nsfd; in main() local
95 nsfd = open(buf, O_RDONLY); in main()
96 if (nsfd == -1) { in main()
104 if (setns(nsfd, CLONE_NEWNET) == -1) { in main()
Dsetns-sysvipc.c48 int nsfd; in main() local
94 nsfd = open(buf, O_RDONLY); in main()
95 if (nsfd == -1) { in main()
103 if (setns(nsfd, CLONE_NEWIPC) == -1) { in main()
/linux-6.1.9/tools/testing/selftests/timens/
Dgettime_perf.c68 int nsfd; in main() local
84 nsfd = open("/proc/self/ns/time_for_children", O_RDONLY); in main()
85 if (nsfd < 0) in main()
93 if (setns(nsfd, CLONE_NEWTIME)) in main()
Dclock_nanosleep.c116 int ret, nsfd; in main() local
132 nsfd = open("/proc/self/ns/time_for_children", O_RDONLY); in main()
133 if (nsfd < 0) in main()
136 if (setns(nsfd, CLONE_NEWTIME)) in main()
/linux-6.1.9/tools/testing/selftests/pidfd/
Dpidfd_setns_test.c385 int nsfd; in TEST_F() local
400 nsfd = self->nsfds[i]; in TEST_F()
402 nsfd = self->child_nsfds1[i]; in TEST_F()
403 ASSERT_EQ(in_same_namespace(nsfd, pid, info->name), 1) { in TEST_F()
421 int nsfd; in TEST_F() local
436 nsfd = self->nsfds[i]; in TEST_F()
438 nsfd = self->child_nsfds1[i]; in TEST_F()
439 ASSERT_EQ(in_same_namespace(nsfd, pid, info->name), 1) { in TEST_F()
474 int nsfd; in TEST_F() local
481 nsfd = self->nsfds[i]; in TEST_F()
[all …]
/linux-6.1.9/tools/testing/selftests/bpf/
Dnetwork_helpers.c393 static int setns_by_fd(int nsfd) in setns_by_fd() argument
397 err = setns(nsfd, CLONE_NEWNET); in setns_by_fd()
398 close(nsfd); in setns_by_fd()
438 int nsfd; in open_netns() local
452 nsfd = open(nspath, O_RDONLY | O_CLOEXEC); in open_netns()
453 if (!ASSERT_GE(nsfd, 0, "open netns fd")) in open_netns()
456 err = setns_by_fd(nsfd); in open_netns()
Dxskxceiver.c405 int nsfd; in switch_namespace() local
411 nsfd = open(fqns, O_RDONLY); in switch_namespace()
413 if (nsfd == -1) in switch_namespace()
416 if (setns(nsfd, 0) == -1) in switch_namespace()
421 return nsfd; in switch_namespace()
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dxdp_bonding.c41 int nsfd, err; in setns_by_name() local
45 nsfd = open(nspath, O_RDONLY | O_CLOEXEC); in setns_by_name()
46 if (nsfd < 0) in setns_by_name()
49 err = setns(nsfd, CLONE_NEWNET); in setns_by_name()
50 close(nsfd); in setns_by_name()
/linux-6.1.9/tools/testing/selftests/net/
Dipsec.c481 static int init_child(int nsfd, char *veth, unsigned int src, unsigned int dst) in init_child() argument
489 if (switch_ns(nsfd)) in init_child()