Home
last modified time | relevance | path

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

/linux-6.3-rc2/tools/testing/selftests/proc/
A 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()
A 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.3-rc2/tools/testing/selftests/timens/
A 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()
A 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.3-rc2/tools/testing/selftests/pidfd/
A 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.3-rc2/tools/testing/selftests/bpf/
A Dnetwork_helpers.c395 int nsfd; in open_netns() local
409 nsfd = open(nspath, O_RDONLY | O_CLOEXEC); in open_netns()
410 if (!ASSERT_GE(nsfd, 0, "open netns fd")) in open_netns()
413 err = setns(nsfd, CLONE_NEWNET); in open_netns()
414 close(nsfd); in open_netns()
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/
A 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.3-rc2/tools/testing/selftests/net/
A 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()

Completed in 16 milliseconds