Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 639) sorted by relevance

12345678910>>...26

/tools/testing/selftests/powerpc/ptrace/
A Dptrace-perf-hwbreak.c89 err = ptrace_getregs(pid, &regs); in ptrace_getreg_pc()
103 err = ptrace_getregs(pid, &regs); in ptrace_setreg_pc()
194 *pid = fork(); in ptrace_fork_child()
196 if (*pid < 0) in ptrace_fork_child()
199 if (!*pid) { in ptrace_fork_child()
237 err = ptrace_fork_child(&pid); in same_watch_addr_test()
241 if (!pid) { in same_watch_addr_test()
246 err = check_watchpoints(pid); in same_watch_addr_test()
392 err = ptrace_fork_child(&pid); in perf_then_ptrace_test()
400 if (!pid) { in perf_then_ptrace_test()
[all …]
/tools/testing/selftests/powerpc/signal/
A Dsigreturn_kernel.c35 pid_t pid; in fork_child() local
37 pid = fork(); in fork_child()
38 if (pid == 0) { in fork_child()
43 return pid; in fork_child()
62 pid_t pid; in test_sigreturn_kernel() local
74 expect_segv(pid); in test_sigreturn_kernel()
79 expect_segv(pid); in test_sigreturn_kernel()
84 expect_segv(pid); in test_sigreturn_kernel()
89 expect_segv(pid); in test_sigreturn_kernel()
94 expect_segv(pid); in test_sigreturn_kernel()
[all …]
/tools/testing/selftests/rlimits/
A Drlimits-per-userns.c32 pid_t pid = getpid(); in setrlimit_nproc() local
46 pid_t pid = fork(); in fork_child() local
48 if (pid < 0) in fork_child()
51 if (pid > 0) in fork_child()
52 return pid; in fork_child()
54 pid = getpid(); in fork_child()
91 pid_t pid; in main() local
99 pid = getpid(); in main()
101 warnx("(pid=%d) Starting testcase", pid); in main()
155 warnx("(pid=%d): Test failed", pid); in main()
[all …]
/tools/testing/selftests/pid_namespace/
A Dpid_max.c41 pid_t pid; in pid_max_cb() local
70 pid = fork(); in pid_max_cb()
71 if (pid == 0) in pid_max_cb()
138 pid_t pid; in pid_max_nested_inner() local
141 if (pid < 0) in pid_max_nested_inner()
162 pid_t pid; in pid_max_nested_outer() local
230 pid_t pid; in pid_max_nested_limit_inner() local
288 pid_t pid; in pid_max_nested_limit_outer() local
333 pid_t pid; in TEST() local
343 pid_t pid; in TEST() local
[all …]
A Dregression_enomem.c24 pid_t pid; in TEST() local
31 pid = fork(); in TEST()
32 ASSERT_GE(pid, 0); in TEST()
34 if (pid == 0) in TEST()
37 EXPECT_EQ(0, wait_for_pid(pid)); in TEST()
39 pid = fork(); in TEST()
40 ASSERT_LT(pid, 0); in TEST()
/tools/include/nolibc/sys/
A Dwait.h28 return my_syscall4(__NR_wait4, pid, status, options, rusage); in sys_wait4()
30 return __nolibc_enosys(__func__, pid, status, options, rusage); in sys_wait4()
37 return __sysret(sys_wait4(pid, status, options, rusage)); in wait4()
47 int waitid(int which, pid_t pid, siginfo_t *infop, int options) in waitid() argument
54 pid_t waitpid(pid_t pid, int *status, int options) in waitpid() argument
60 if (pid == INT_MIN) { in waitpid()
63 } else if (pid < -1) { in waitpid()
65 id = -pid; in waitpid()
66 } else if (pid == -1) { in waitpid()
69 } else if (pid == 0) { in waitpid()
[all …]
/tools/testing/selftests/bpf/progs/
A Dtask_kfunc_common.h25 struct task_struct *bpf_task_from_pid(s32 pid) __ksym;
32 s32 pid; in tasks_kfunc_map_value_lookup() local
35 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_value_lookup()
39 return bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_value_lookup()
47 s32 pid; in tasks_kfunc_map_insert() local
49 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_insert()
54 status = bpf_map_update_elem(&__tasks_kfunc_map, &pid, &local, BPF_NOEXIST); in tasks_kfunc_map_insert()
58 v = bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert()
60 bpf_map_delete_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert()
A Dtest_uprobe.c18 pid_t pid = bpf_get_current_pid_tgid() >> 32; in BPF_UPROBE() local
20 if (pid != my_pid) in BPF_UPROBE()
30 pid_t pid = bpf_get_current_pid_tgid() >> 32; in BPF_UPROBE() local
32 if (pid != my_pid) in BPF_UPROBE()
42 pid_t pid = bpf_get_current_pid_tgid() >> 32; in BPF_URETPROBE() local
44 if (pid != my_pid) in BPF_URETPROBE()
54 pid_t pid = bpf_get_current_pid_tgid() >> 32; in BPF_UPROBE() local
56 if (pid != my_pid) in BPF_UPROBE()
/tools/perf/scripts/perl/
A Drw-by-pid.pl84 my $comm = $reads{$pid}{comm} || "";
85 my $total_reads = $reads{$pid}{total_reads} || 0;
87 my $bytes_read = $reads{$pid}{bytes_read} || 0;
101 foreach my $pid (keys %reads) {
102 foreach my $error (keys %{$reads{$pid}{errors}}) {
103 my $comm = $reads{$pid}{comm} || "";
125 my $comm = $writes{$pid}{comm} || "";
129 printf("%6s %-20s %10s %10s\n", $pid, $comm,
141 foreach my $pid (keys %writes) {
142 foreach my $error (keys %{$writes{$pid}{errors}}) {
[all …]
/tools/testing/selftests/proc/
A Dproc-loadavg-001.c27 pid_t pid; in main() local
36 pid = fork(); in main()
37 if (pid == -1) in main()
39 if (pid == 0) { in main()
56 pid = fork(); in main()
57 if (pid == -1) in main()
59 if (pid == 0) in main()
61 if (waitpid(pid, NULL, 0) == -1) in main()
77 if (waitpid(pid, &wstatus, 0) == -1) in main()
A Dsetns-dcache.c36 static pid_t pid = -1; variable
40 if (pid > 0) { in f()
41 kill(pid, SIGTERM); in f()
69 pid = fork(); in main()
70 if (pid == -1) { in main()
74 if (pid == 0) { in main()
94 snprintf(buf, sizeof(buf), "/proc/%u/ns/net", pid); in main()
108 kill(pid, SIGTERM); in main()
109 pid = 0; in main()
A Dsetns-sysvipc.c35 static pid_t pid = -1; variable
39 if (pid > 0) { in f()
40 kill(pid, SIGTERM); in f()
68 pid = fork(); in main()
69 if (pid == -1) { in main()
73 if (pid == 0) { in main()
93 snprintf(buf, sizeof(buf), "/proc/%u/ns/ipc", pid); in main()
107 kill(pid, SIGTERM); in main()
108 pid = 0; in main()
A Dproc-tid0.c26 static pid_t pid = -1; variable
30 if (pid > 0) { in atexit_hook()
31 kill(pid, SIGKILL); in atexit_hook()
47 pid = fork(); in main()
48 if (pid == 0) { in main()
55 } else if (pid > 0) { in main()
60 snprintf(buf, sizeof(buf), "/proc/%u/task", pid); in main()
A Dproc-empty-vm.c173 pid_t pid; in vsyscall() local
176 pid = fork(); in vsyscall()
177 if (pid < 0) { in vsyscall()
181 if (pid == 0) { in vsyscall()
206 waitpid(pid, &wstatus, 0); in vsyscall()
462 pid_t pid = fork(); in main() local
463 if (pid == -1) { in main()
466 } else if (pid == 0) { in main()
512 rv = test_proc_pid_maps(pid); in main()
518 rv = test_proc_pid_smaps(pid); in main()
[all …]
/tools/testing/selftests/ptrace/
A Dvmaccess.c26 int f, pid = fork(); in TEST() local
29 if (!pid) { in TEST()
38 sprintf(mm, "/proc/%d/mem", pid); in TEST()
42 f = kill(pid, SIGCONT); in TEST()
48 int s, k, pid = fork(); in TEST() local
50 if (!pid) { in TEST()
59 k = ptrace(PTRACE_ATTACH, pid, 0L, 0L); in TEST()
65 ASSERT_NE(k, pid); in TEST()
69 k = ptrace(PTRACE_ATTACH, pid, 0L, 0L); in TEST()
72 ASSERT_EQ(k, pid); in TEST()
[all …]
A Dget_syscall_info.c17 kill_tracee(pid_t pid) in kill_tracee() argument
19 if (!pid) in kill_tracee()
24 int rc = kill(pid, SIGKILL); in kill_tracee()
38 kill_tracee(pid); \
77 pid_t pid = fork(); in TEST() local
79 ASSERT_LE(0, pid) { in TEST()
83 if (pid == 0) { in TEST()
85 pid = getpid(); in TEST()
107 { 0, pid } /* gettid */ in TEST()
156 pid, size, in TEST()
[all …]
/tools/bpf/runqslower/
A Drunqslower.bpf.c30 u32 pid = t->pid; in trace_enqueue() local
33 if (!pid || (targ_pid && targ_pid != pid)) in trace_enqueue()
73 u32 pid; in handle__sched_switch() local
79 pid = next->pid; in handle__sched_switch()
82 if (!pid || (targ_pid && targ_pid != pid)) in handle__sched_switch()
94 event.pid = pid; in handle__sched_switch()
/tools/testing/selftests/cgroup/lib/
A Dcgroup_util.c377 return pid; in cg_run()
397 pid_t pid; in clone_into_cgroup() local
414 return pid; in clone_into_cgroup()
472 pid_t pid; in clone_into_cgroup_run_nowait() local
483 return pid; in clone_into_cgroup_run_nowait()
490 int pid; in cg_run_nowait() local
493 if (pid > 0) in cg_run_nowait()
494 return pid; in cg_run_nowait()
510 return pid; in cg_run_nowait()
530 if (!pid) in proc_read_text()
[all …]
/tools/testing/selftests/powerpc/
A Dharness.c31 pid_t pid; in run_test() local
36 pid = fork(); in run_test()
37 if (pid == 0) { in run_test()
40 } else if (pid == -1) { in run_test()
45 setpgid(pid, pid); in run_test()
53 rc = waitpid(pid, &status, 0); in run_test()
62 kill(-pid, SIGKILL); in run_test()
66 kill(-pid, SIGTERM); in run_test()
74 kill(-pid, SIGTERM); in run_test()
/tools/testing/selftests/clone3/
A Dclone3_cap_checkpoint_restore.c41 pid_t pid = -1; in call_clone3_set_tid() local
49 pid = sys_clone3(&args, sizeof(args)); in call_clone3_set_tid()
50 if (pid < 0) { in call_clone3_set_tid()
55 if (pid == 0) { in call_clone3_set_tid()
68 if (waitpid(pid, &status, 0) < 0) { in call_clone3_set_tid()
136 pid_t pid; in TEST() local
149 pid = fork(); in TEST()
150 if (pid == 0) { in TEST()
154 ASSERT_GT(waitpid(pid, &status, 0), 0) in TEST()
158 set_tid[0] = pid; in TEST()
[all …]
A Dclone3_set_tid.c45 pid_t pid = -1; in call_clone3_set_tid() local
55 if (pid < 0) { in call_clone3_set_tid()
61 if (pid == 0) { in call_clone3_set_tid()
270 pid = fork(); in main()
271 if (pid == 0) { in main()
279 set_tid[0] = pid; in main()
293 set_tid[1] = pid; in main()
302 set_tid[0] = pid; in main()
321 set_tid[1] = pid; in main()
332 set_tid[2] = pid; in main()
[all …]
A Dclone3_clear_sighand.c23 static int wait_for_pid(pid_t pid) in wait_for_pid() argument
28 ret = waitpid(pid, &status, 0); in wait_for_pid()
45 pid_t pid; in test_clone3_clear_sighand() local
55 pid = sys_clone3(&args, sizeof(args)); in test_clone3_clear_sighand()
56 if (pid > 0) in test_clone3_clear_sighand()
84 pid = sys_clone3(&args, sizeof(args)); in test_clone3_clear_sighand()
85 if (pid < 0) in test_clone3_clear_sighand()
89 if (pid == 0) { in test_clone3_clear_sighand()
107 ret = wait_for_pid(pid); in test_clone3_clear_sighand()
/tools/testing/selftests/powerpc/benchmarks/
A Dfork.c48 int pid; in start_process_on() local
50 pid = fork(); in start_process_on()
51 if (pid == -1) { in start_process_on()
56 if (pid) in start_process_on()
89 if (pid == -1) { in bench_fork()
93 if (pid == 0) { in bench_fork()
98 pid = waitpid(pid, NULL, 0); in bench_fork()
99 if (pid == -1) { in bench_fork()
111 if (pid == -1) { in bench_vfork()
115 if (pid == 0) { in bench_vfork()
[all …]
/tools/testing/selftests/cgroup/
A Dtest_freezer.c403 int pid; in test_cgfreezer_mkdir() local
423 if (pid < 0) in test_cgfreezer_mkdir()
512 int pid; in test_cgfreezer_migrate() local
529 if (pid < 0) in test_cgfreezer_migrate()
588 int pid; in test_cgfreezer_ptrace() local
598 if (pid < 0) in test_cgfreezer_ptrace()
613 waitpid(pid, NULL, 0); in test_cgfreezer_ptrace()
733 waitpid(pid, NULL, 0); in test_cgfreezer_ptraced()
765 int pid = vfork(); in vfork_fn() local
767 if (pid == 0) in vfork_fn()
[all …]
/tools/testing/selftests/pidfd/
A Dpidfd_wait.c39 pid_t pid; in TEST() local
48 ASSERT_NE(pid, 0); in TEST()
56 ASSERT_NE(pid, 0); in TEST()
61 ASSERT_GE(pid, 0); in TEST()
63 if (pid == 0) in TEST()
67 ASSERT_GE(pid, 0); in TEST()
88 pid_t pid; in TEST() local
95 ASSERT_GE(pid, 0); in TEST()
97 if (pid == 0) { in TEST()
149 pid_t pid; in TEST() local
[all …]

Completed in 33 milliseconds

12345678910>>...26