Searched refs:nsfd (Results 1 - 10 of 10) sorted by relevance

/linux-master/tools/testing/selftests/proc/
H A Dsetns-dcache.c49 int nsfd; local
95 nsfd = open(buf, O_RDONLY);
96 if (nsfd == -1) {
104 if (setns(nsfd, CLONE_NEWNET) == -1) {
H A Dsetns-sysvipc.c48 int nsfd; local
94 nsfd = open(buf, O_RDONLY);
95 if (nsfd == -1) {
103 if (setns(nsfd, CLONE_NEWIPC) == -1) {
/linux-master/tools/testing/selftests/timens/
H A Dgettime_perf.c68 int nsfd; local
84 nsfd = open("/proc/self/ns/time_for_children", O_RDONLY);
85 if (nsfd < 0)
93 if (setns(nsfd, CLONE_NEWTIME))
H A Dclock_nanosleep.c116 int ret, nsfd; local
132 nsfd = open("/proc/self/ns/time_for_children", O_RDONLY);
133 if (nsfd < 0)
136 if (setns(nsfd, CLONE_NEWTIME))
/linux-master/tools/testing/selftests/pidfd/
H A Dpidfd_setns_test.c385 int nsfd; local
400 nsfd = self->nsfds[i];
402 nsfd = self->child_nsfds1[i];
403 ASSERT_EQ(in_same_namespace(nsfd, pid, info->name), 1) {
421 int nsfd; local
428 TH_LOG("%m - Failed to setns to %s namespace of %d via nsfd %d",
436 nsfd = self->nsfds[i];
438 nsfd = self->child_nsfds1[i];
439 ASSERT_EQ(in_same_namespace(nsfd, pid, info->name), 1) {
440 TH_LOG("setns failed to place us correctly into %s namespace of %d via nsfd
474 int nsfd; local
[all...]
/linux-master/tools/testing/selftests/net/tcp_ao/lib/
H A Dnetlink.c349 uint32_t tabid, int ifindex, int nsfd)
372 if (nsfd >= 0)
374 &nsfd, sizeof(nsfd)))
402 int add_vrf(const char *name, uint32_t tabid, int ifindex, int nsfd) argument
410 ret = __add_vrf(route_sock, route_seq++, name, tabid, ifindex, nsfd);
348 __add_vrf(int sock, uint32_t seq, const char *name, uint32_t tabid, int ifindex, int nsfd) argument
H A Daolib.h229 extern int add_vrf(const char *name, uint32_t tabid, int ifindex, int nsfd);
/linux-master/tools/testing/selftests/bpf/
H A Dnetwork_helpers.c439 int nsfd; local
453 nsfd = open(nspath, O_RDONLY | O_CLOEXEC);
454 if (!ASSERT_GE(nsfd, 0, "open netns fd"))
457 err = setns(nsfd, CLONE_NEWNET);
458 close(nsfd);
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_bonding.c42 int nsfd, err; local
46 nsfd = open(nspath, O_RDONLY | O_CLOEXEC);
47 if (nsfd < 0)
50 err = setns(nsfd, CLONE_NEWNET);
51 close(nsfd);
/linux-master/tools/testing/selftests/net/
H A Dipsec.c481 static int init_child(int nsfd, char *veth, unsigned int src, unsigned int dst) argument
489 if (switch_ns(nsfd))

Completed in 143 milliseconds