Searched refs:nsfd (Results 1 – 9 of 9) sorted by relevance
/linux-6.1.9/tools/testing/selftests/proc/ |
D | setns-dcache.c | 49 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()
|
D | setns-sysvipc.c | 48 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/ |
D | gettime_perf.c | 68 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()
|
D | clock_nanosleep.c | 116 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/ |
D | pidfd_setns_test.c | 385 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/ |
D | network_helpers.c | 393 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()
|
D | xskxceiver.c | 405 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/ |
D | xdp_bonding.c | 41 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/ |
D | ipsec.c | 481 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()
|