/kernel/linux/linux-5.10/tools/testing/selftests/pidfd/ |
H A D | pidfd_setns_test.c | 97 ret = setns(fd, CLONE_NEWTIME); in switch_timens() 345 ASSERT_NE(setns(self->pidfd, 0), 0); in TEST_F() 348 ASSERT_NE(setns(self->pidfd, -1), 0); in TEST_F() 351 ASSERT_NE(setns(self->pidfd, CLONE_VM), 0); in TEST_F() 354 ASSERT_NE(setns(self->pidfd, CLONE_NEWUSER | CLONE_VM), 0); in TEST_F() 364 ASSERT_NE(setns(self->child_pidfd_exited, CLONE_NEWUSER | CLONE_NEWNET), in TEST_F() 391 ASSERT_EQ(setns(self->child_pidfd1, info->flag), 0) { in TEST_F() 392 TH_LOG("%m - Failed to setns to %s namespace of %d via pidfd %d", in TEST_F() 404 TH_LOG("setns failed to place us correctly into %s namespace of %d via pidfd %d", in TEST_F() 408 TH_LOG("Managed to correctly setns t in TEST_F() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/pidfd/ |
H A D | pidfd_setns_test.c | 97 ret = setns(fd, CLONE_NEWTIME); in switch_timens() 345 ASSERT_NE(setns(self->pidfd, 0), 0); in TEST_F() 348 ASSERT_NE(setns(self->pidfd, -1), 0); in TEST_F() 351 ASSERT_NE(setns(self->pidfd, CLONE_VM), 0); in TEST_F() 354 ASSERT_NE(setns(self->pidfd, CLONE_NEWUSER | CLONE_VM), 0); in TEST_F() 364 ASSERT_NE(setns(self->child_pidfd_exited, CLONE_NEWUSER | CLONE_NEWNET), in TEST_F() 391 ASSERT_EQ(setns(self->child_pidfd1, info->flag), 0) { in TEST_F() 392 TH_LOG("%m - Failed to setns to %s namespace of %d via pidfd %d", in TEST_F() 404 TH_LOG("setns failed to place us correctly into %s namespace of %d via pidfd %d", in TEST_F() 408 TH_LOG("Managed to correctly setns t in TEST_F() [all...] |
/test/xts/hats/kernel/syscalls/ns/setns/ |
H A D | SetnsApiTest.cpp | 59 * @tc.desc : setns success. 75 ret = setns(fd, CLONE_NEWIPC); in HWTEST_F() 86 ret = setns(fd, CLONE_NEWNET); in HWTEST_F() 97 ret = setns(fd, CLONE_NEWPID); in HWTEST_F() 108 ret = setns(fd, CLONE_NEWUTS); in HWTEST_F()
|
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
H A D | setns.c | 41 int result = setns(fd, 0); in setns_0100() 59 int result = setns(fd, nstype); in setns_0200()
|
/kernel/linux/linux-5.10/tools/testing/selftests/proc/ |
H A D | Makefile | 19 TEST_GEN_PROGS += setns-dcache 20 TEST_GEN_PROGS += setns-sysvipc
|
H A D | setns-dcache.c | 17 * Test that setns(CLONE_NEWNET) points to new /proc/net content even 104 if (setns(nsfd, CLONE_NEWNET) == -1) { in main()
|
/third_party/ltp/testcases/kernel/containers/userns/ |
H A D | userns04.c | 12 * namespace and the setns() call fails. 28 TST_EXP_FAIL(setns(fd, CLONE_NEWUSER), EPERM); in child_fn2() 60 TST_EXP_PASS(setns(fd, CLONE_NEWUSER)); in run()
|
/third_party/rust/crates/rustix/src/thread/ |
H A D | mod.rs | 12 mod setns; modules 35 pub use setns::*;
|
H A D | setns.rs | 90 /// - [`setns`] 92 /// [`setns`]: https://man7.org/linux/man-pages/man2/setns.2.html 98 syscalls::setns(fd, allowed_type).map(|_r| ()) in move_into_link_name_space() 107 /// - [`setns`] 109 /// [`setns`]: https://man7.org/linux/man-pages/man2/setns.2.html 114 syscalls::setns(fd, allowed_types.bits() as c_int).map(|_r| ()) in move_into_thread_name_spaces()
|
/kernel/linux/linux-6.6/tools/testing/selftests/proc/ |
H A D | Makefile | 23 TEST_GEN_PROGS += setns-dcache 24 TEST_GEN_PROGS += setns-sysvipc
|
/kernel/liteos_a/testsuites/unittest/container/smoke/ |
H A D | It_uts_container_005.cpp | 73 ret = setns(fd, setFlag); in UtsContainerTest() 96 ret = setns(fd, setFlag); in UtsContainerTest()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | flow_dissector_reattach.c | 84 setns(old_net, CLONE_NEWNET); in unshare_net() 455 err = setns(old_net, CLONE_NEWNET); in test_link_update_netns_gone() 457 perror("setns(CLONE_NEWNET)"); in test_link_update_netns_gone() 539 err = setns(old_net, CLONE_NEWNET); in test_link_get_info() 541 perror("setns(NEWNET)"); in test_link_get_info() 567 setns(old_net, CLONE_NEWNET); in test_link_get_info() 647 err = setns(init_net, CLONE_NEWNET); in test_flow_dissector_reattach() 649 perror("setns(/proc/1/ns/net)"); in test_flow_dissector_reattach() 671 err = setns(saved_net, CLONE_NEWNET); in test_flow_dissector_reattach() 673 perror("setns(/pro in test_flow_dissector_reattach() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | flow_dissector_reattach.c | 84 setns(old_net, CLONE_NEWNET); in unshare_net() 455 err = setns(old_net, CLONE_NEWNET); in test_link_update_netns_gone() 457 perror("setns(CLONE_NEWNET)"); in test_link_update_netns_gone() 539 err = setns(old_net, CLONE_NEWNET); in test_link_get_info() 541 perror("setns(NEWNET)"); in test_link_get_info() 567 setns(old_net, CLONE_NEWNET); in test_link_get_info() 647 err = setns(init_net, CLONE_NEWNET); in serial_test_flow_dissector_reattach() 649 perror("setns(/proc/1/ns/net)"); in serial_test_flow_dissector_reattach() 671 err = setns(saved_net, CLONE_NEWNET); in serial_test_flow_dissector_reattach() 673 perror("setns(/pro in serial_test_flow_dissector_reattach() [all...] |
/third_party/toybox/toys/other/ |
H A D | nsenter.c | 71 #define setns(fd, nstype) syscall(SYS_setns, fd, nstype) macro 158 if (setns(fd = xopenro(filename), flags[i])) perror_exit("setns"); in unshare_main()
|
/kernel/linux/linux-5.10/tools/build/feature/ |
H A D | test-setns.c | 7 return setns(0, 0); in main()
|
/kernel/linux/linux-6.6/tools/build/feature/ |
H A D | test-setns.c | 7 return setns(0, 0); in main()
|
/third_party/musl/src/linux/ |
H A D | setns.c | 5 int setns(int fd, int nstype) in setns() function
|
/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | setns.c | 7 int setns(int fd, int nstype) in setns() function
|
H A D | namespaces.c | 233 if (setns(newns, CLONE_NEWNS) < 0) in nsinfo__mountns_enter() 254 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
|
H A D | namespaces.h | 17 int setns(int fd, int nstype);
|
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | setns.c | 7 int setns(int fd, int nstype) in setns() function
|
/third_party/ltp/include/lapi/ |
H A D | setns.h | 14 static inline int setns(int fd, int nstype) in setns() function
|
/kernel/liteos_a/testsuites/unittest/fuzz/ |
H A D | setns_fuzzer.cpp | 43 setns(number0, number1); in TestSetns()
|
/third_party/rust/crates/rustix/tests/thread/ |
H A D | main.rs | 13 mod setns; modules
|
/third_party/rust/crates/nix/src/ |
H A D | sched.rs | 138 /// See also [setns(2)](https://man7.org/linux/man-pages/man2/setns.2.html) 139 pub fn setns(fd: RawFd, nstype: CloneFlags) -> Result<()> { in setns() functions 140 let res = unsafe { libc::setns(fd, nstype.bits()) }; in setns()
|