/kernel/linux/linux-5.10/tools/testing/selftests/pidfd/ |
H A D | pidfd_getfd_test.c | 123 /* pid points to the child which we are fetching FDs from */ in FIXTURE() 124 pid_t pid; in FIXTURE() local 143 self->pid = fork(); in FIXTURE_SETUP() 144 ASSERT_GE(self->pid, 0); in FIXTURE_SETUP() 146 if (self->pid == 0) { in FIXTURE_SETUP() 155 self->pidfd = sys_pidfd_open(self->pid, 0); in FIXTURE_SETUP() 171 EXPECT_EQ(0, wait_for_pid(self->pid)); in FIXTURE_TEARDOWN() 207 ret = sys_kcmp(getpid(), self->pid, KCMP_FILE, fd, self->remote_fd); in TEST_F()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | send_signal.c | 23 pid_t pid; in test_send_signal_common() local 36 pid = fork(); in test_send_signal_common() 37 if (CHECK(pid < 0, test_name, "fork error: %s\n", strerror(errno))) { in test_send_signal_common() 45 if (pid == 0) { in test_send_signal_common() 100 pmu_fd = syscall(__NR_perf_event_open, attr, pid, -1, in test_send_signal_common() 119 skel->bss->pid = pid; in test_send_signal_common() 178 pmu_fd = syscall(__NR_perf_event_open, &attr, 0 /* pid */, in test_send_signal_nmi()
|
H A D | test_bpffs.c | 82 pid_t pid; in test_test_bpffs() local 84 pid = fork(); in test_test_bpffs() 85 if (CHECK(pid == -1, "clone", "clone failed %d", errno)) in test_test_bpffs() 87 if (pid == 0) in test_test_bpffs() 89 err = waitpid(pid, &status, 0); in test_test_bpffs()
|
/kernel/linux/linux-6.6/arch/um/os-Linux/skas/ |
H A D | mem.c | 23 extern void wait_stub_done(int pid); 56 int err, pid = mm_idp->u.pid; in do_syscall_stub() local 58 n = ptrace_setregs(pid, syscall_regs); in do_syscall_stub() 67 err = ptrace(PTRACE_CONT, pid, 0, 0); in do_syscall_stub() 69 panic("Failed to continue stub, pid = %d, errno = %d\n", pid, in do_syscall_stub() 72 wait_stub_done(pid); in do_syscall_stub()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | task_kfunc_success.c | 12 int err, pid; variable 35 return pid == cur_pid; in is_test_kfunc_task() 235 acquired = bpf_task_from_pid(p->pid); in lookup_compare_pid() 241 if (acquired->pid != p->pid) in lookup_compare_pid() 266 static int is_pid_lookup_valid(s32 pid) in is_pid_lookup_valid() argument 270 acquired = bpf_task_from_pid(pid); in is_pid_lookup_valid()
|
/kernel/linux/linux-6.6/tools/testing/selftests/net/ |
H A D | ipv6_flowlabel_mgr.c | 77 pid_t pid; in run_tests() local 131 pid = fork(); in run_tests() 132 if (pid == -1) in run_tests() 134 if (!pid) { in run_tests() 152 pid = fork(); in run_tests() 153 if (pid == -1) in run_tests() 155 if (!pid) { in run_tests()
|
/kernel/linux/linux-6.6/tools/testing/selftests/pidfd/ |
H A D | pidfd_getfd_test.c | 123 /* pid points to the child which we are fetching FDs from */ in FIXTURE() 124 pid_t pid; in FIXTURE() local 143 self->pid = fork(); in FIXTURE_SETUP() 144 ASSERT_GE(self->pid, 0); in FIXTURE_SETUP() 146 if (self->pid == 0) { in FIXTURE_SETUP() 155 self->pidfd = sys_pidfd_open(self->pid, 0); in FIXTURE_SETUP() 171 EXPECT_EQ(0, wait_for_pid(self->pid)); in FIXTURE_TEARDOWN() 207 ret = sys_kcmp(getpid(), self->pid, KCMP_FILE, fd, self->remote_fd); in TEST_F()
|
/third_party/node/test/internet/ |
H A D | test-dgram-broadcast-multi-process.js | 82 workers[worker.pid] = worker; 97 worker.pid, 128 worker.pid, 137 Object.keys(workers).forEach((pid) => { 138 const worker = workers[pid]; 152 worker.pid, 230 process.pid,
|
H A D | test-dgram-multicast-multi-process.js | 47 workers[worker.pid] = worker; 61 worker.pid, 89 worker.pid, 97 Object.keys(workers).forEach(function(pid) { 98 const worker = workers[pid]; 112 worker.pid, count); 207 console.error('[CHILD] %s received "%s" from %j', process.pid,
|
H A D | test-dgram-multicast-ssmv6-multi-process.js | 41 workers[worker.pid] = worker; 55 worker.pid, 83 worker.pid, 91 Object.keys(workers).forEach(function(pid) { 92 const worker = workers[pid]; 106 worker.pid, count); 202 console.error('[CHILD] %s received "%s" from %j', process.pid,
|
H A D | test-dgram-multicast-ssm-multi-process.js | 41 workers[worker.pid] = worker; 55 worker.pid, 83 worker.pid, 91 Object.keys(workers).forEach(function(pid) { 92 const worker = workers[pid]; 106 worker.pid, count); 202 console.error('[CHILD] %s received "%s" from %j', process.pid,
|
/third_party/ltp/testcases/kernel/io/ltp-aiodio/ |
H A D | aiodio_sparse.c | 191 int i, pid; in run() local 202 pid = SAFE_FORK(); in run() 203 if (!pid) { in run() 208 tst_res(TINFO, "Child %i creates a sparse file", pid); in run() 211 if (SAFE_WAITPID(pid, NULL, WNOHANG)) in run() 218 kill(pid, SIGKILL); in run() 219 SAFE_WAITPID(pid, NULL, 0); in run()
|
H A D | aiodio_append.c | 144 int i, pid; in run() local 155 pid = SAFE_FORK(); in run() 156 if (!pid) { in run() 161 tst_res(TINFO, "Child %i appends to a file", pid); in run() 164 if (SAFE_WAITPID(pid, NULL, WNOHANG)) in run() 171 kill(pid, SIGKILL); in run() 172 SAFE_WAITPID(pid, NULL, 0); in run()
|
/third_party/ltp/testcases/kernel/syscalls/futex/ |
H A D | futex_cmp_requeue01.c | 59 int pid = getpid(); in do_child() local 68 pid); in do_child() 89 int pid[tc->num_waiters]; in verify_futex_cmp_requeue() local 95 pid[i] = SAFE_FORK(); in verify_futex_cmp_requeue() 96 if (!pid[i]) in verify_futex_cmp_requeue() 101 TST_PROCESS_STATE_WAIT(pid[i], 'S', 0); in verify_futex_cmp_requeue() 134 SAFE_WAITPID(pid[i], &status, 0); in verify_futex_cmp_requeue()
|
/third_party/ltp/testcases/kernel/syscalls/ipc/shmctl/ |
H A D | shmctl01.c | 68 pid_t pid = SAFE_FORK(); in fork_children() local 70 if (!pid) in fork_children() 73 children[i] = pid; in fork_children() 169 pid_t pid = getpid(); in check_ds() local 178 if (ds->shm_cpid != pid) { in check_ds() 180 desc, ds->shm_cpid, pid); in check_ds() 182 tst_res(TPASS, "%s: shm_cpid=%i", desc, pid); in check_ds()
|
/third_party/rust/crates/rustix/src/backend/libc/process/ |
H A D | syscalls.rs | 134 let pid = c::getpid(); 135 debug_assert_ne!(pid, 0); 136 Pid::from_raw_nonzero(RawNonZeroPid::new_unchecked(pid)) 145 let pid: i32 = c::getppid(); 146 Pid::from_raw(pid) 152 pub(crate) fn getpgid(pid: Option<Pid>) -> io::Result<Pid> { 154 let pgid = ret_pid_t(c::getpgid(Pid::as_raw(pid) as _))?; 178 pub(crate) fn sched_getaffinity(pid: Option<Pid>, cpuset: &mut RawCpuSet) -> io::Result<()> { 181 Pid::as_raw(pid) as _, 195 pub(crate) fn sched_setaffinity(pid [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/pmu/ebb/ |
H A D | cpu_event_pinned_vs_ebb_test.c | 44 pid_t pid; in cpu_event_pinned_vs_ebb() local 55 pid = fork(); in cpu_event_pinned_vs_ebb() 56 if (pid == 0) { in cpu_event_pinned_vs_ebb() 64 kill_child_and_wait(pid); in cpu_event_pinned_vs_ebb() 78 FAIL_IF(wait_for_child(pid) != 2); in cpu_event_pinned_vs_ebb()
|
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/mm/ |
H A D | stack_expansion_signal.c | 75 pid_t pid; in test_one_size() local 80 pid = fork(); in test_one_size() 81 if (pid == 0) { in test_one_size() 91 kill(pid, SIGUSR1); in test_one_size() 93 FAIL_IF(wait_for_child(pid)); in test_one_size()
|
/kernel/linux/linux-5.10/tools/testing/selftests/nsfs/ |
H A D | pidns.c | 43 char *ns_strs[] = {"pid", "user"}; in main() 44 char path[] = "/proc/0123456789/ns/pid"; in main() 48 pid_t pid; in main() local 50 pid = clone(child, ca.stack_ptr, CLONE_NEWUSER | CLONE_NEWPID | SIGCHLD, NULL); in main() 51 if (pid < 0) in main() 55 snprintf(path, sizeof(path), "/proc/%d/ns/%s", pid, ns_strs[i]); in main() 76 kill(pid, SIGKILL); in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/cgroup/ |
H A D | cgroup_util.h | 38 extern int cg_enter(const char *cgroup, int pid); 48 extern int set_oom_adj_score(int pid, int score); 51 extern ssize_t proc_read_text(int pid, bool thread, const char *item, char *buf, size_t size); 52 extern int proc_read_strstr(int pid, bool thread, const char *item, const char *needle); 54 extern int clone_reap(pid_t pid, int options);
|
/kernel/linux/linux-5.10/tools/perf/scripts/python/ |
H A D | failed-syscalls-by-pid.py | 1 # failed system call counts, by pid 5 # Displays system-wide failed system call totals, broken down by pid. 20 usage = "perf script -s syscall-counts-by-pid.py [comm|pid]\n"; 66 print("%-30s %10s" % ("comm [pid]", "count")) 72 for pid in pid_keys: 73 print("\n%s [%d]" % (comm, pid)) 74 id_keys = syscalls[comm][pid].keys() 77 ret_keys = syscalls[comm][pid][id].keys() 78 for ret, val in sorted(syscalls[comm][pid][i [all...] |
/kernel/linux/linux-6.6/tools/perf/scripts/python/ |
H A D | failed-syscalls-by-pid.py | 1 # failed system call counts, by pid 5 # Displays system-wide failed system call totals, broken down by pid. 20 usage = "perf script -s syscall-counts-by-pid.py [comm|pid]\n"; 66 print("%-30s %10s" % ("comm [pid]", "count")) 72 for pid in pid_keys: 73 print("\n%s [%d]" % (comm, pid)) 74 id_keys = syscalls[comm][pid].keys() 77 ret_keys = syscalls[comm][pid][id].keys() 78 for ret, val in sorted(syscalls[comm][pid][i [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/nsfs/ |
H A D | pidns.c | 43 char *ns_strs[] = {"pid", "user"}; in main() 44 char path[] = "/proc/0123456789/ns/pid"; in main() 48 pid_t pid; in main() local 50 pid = clone(child, ca.stack_ptr, CLONE_NEWUSER | CLONE_NEWPID | SIGCHLD, NULL); in main() 51 if (pid < 0) in main() 55 snprintf(path, sizeof(path), "/proc/%d/ns/%s", pid, ns_strs[i]); in main() 76 kill(pid, SIGKILL); in main()
|
/kernel/linux/linux-6.6/tools/testing/selftests/cgroup/ |
H A D | cgroup_util.h | 44 extern int cg_enter(const char *cgroup, int pid); 54 extern int set_oom_adj_score(int pid, int score); 58 extern ssize_t proc_read_text(int pid, bool thread, const char *item, char *buf, size_t size); 59 extern int proc_read_strstr(int pid, bool thread, const char *item, const char *needle); 61 extern int clone_reap(pid_t pid, int options);
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/mm/ |
H A D | stack_expansion_signal.c | 75 pid_t pid; in test_one_size() local 80 pid = fork(); in test_one_size() 81 if (pid == 0) { in test_one_size() 91 kill(pid, SIGUSR1); in test_one_size() 93 FAIL_IF(wait_for_child(pid)); in test_one_size()
|