Home
last modified time | relevance | path

Searched refs:setns (Results 1 - 25 of 77) sorted by relevance

1234

/kernel/linux/linux-5.10/tools/testing/selftests/pidfd/
H A Dpidfd_setns_test.c97 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 Dpidfd_setns_test.c97 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...]
/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dsetns.c41 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 DMakefile19 TEST_GEN_PROGS += setns-dcache
20 TEST_GEN_PROGS += setns-sysvipc
H A Dsetns-dcache.c17 * 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 Duserns04.c12 * 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 Dmod.rs12 mod setns; modules
35 pub use setns::*;
H A Dsetns.rs90 /// - [`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 DMakefile23 TEST_GEN_PROGS += setns-dcache
24 TEST_GEN_PROGS += setns-sysvipc
H A Dsetns-dcache.c17 * Test that setns(CLONE_NEWNET) points to new /proc/net content even
104 if (setns(nsfd, CLONE_NEWNET) == -1) { in main()
/kernel/liteos_a/testsuites/unittest/container/smoke/
H A DIt_uts_container_005.cpp73 ret = setns(fd, setFlag); in UtsContainerTest()
96 ret = setns(fd, setFlag); in UtsContainerTest()
/third_party/toybox/toys/other/
H A Dnsenter.c71 #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/testing/selftests/bpf/prog_tests/
H A Dflow_dissector_reattach.c84 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 Dflow_dissector_reattach.c84 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...]
/kernel/linux/linux-5.10/tools/build/feature/
H A Dtest-setns.c7 return setns(0, 0); in main()
/kernel/linux/linux-6.6/tools/build/feature/
H A Dtest-setns.c7 return setns(0, 0); in main()
/third_party/musl/src/linux/
H A Dsetns.c5 int setns(int fd, int nstype) in setns() function
/kernel/linux/linux-5.10/tools/perf/util/
H A Dsetns.c7 int setns(int fd, int nstype) in setns() function
H A Dnamespaces.c233 if (setns(newns, CLONE_NEWNS) < 0) in nsinfo__mountns_enter()
254 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
H A Dnamespaces.h17 int setns(int fd, int nstype);
/kernel/linux/linux-6.6/tools/perf/util/
H A Dsetns.c7 int setns(int fd, int nstype) in setns() function
/third_party/ltp/include/lapi/
H A Dsetns.h14 static inline int setns(int fd, int nstype) in setns() function
/kernel/liteos_a/testsuites/unittest/fuzz/
H A Dsetns_fuzzer.cpp43 setns(number0, number1); in TestSetns()
/third_party/rust/crates/rustix/tests/thread/
H A Dmain.rs13 mod setns; modules
/third_party/rust/crates/nix/src/
H A Dsched.rs138 /// 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()

Completed in 7 milliseconds

1234