/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-hwbreak.c | 32 static pid_t child_pid; variable 39 ret = ptrace(PPC_PTRACE_GETHWDBGINFO, child_pid, NULL, &dbginfo); in get_dbginfo() 60 ret = ptrace(PTRACE_SET_DEBUGREG, child_pid, 0, addr); in set_breakpoint_addr() 83 ret = ptrace(PPC_PTRACE_SETHWDEBUG, child_pid, 0, &info); in set_hwbreakpoint_addr() 95 ret = ptrace(PPC_PTRACE_DELHWDEBUG, child_pid, 0, watchpoint_handle); in del_hwbreakpoint_addr() 237 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints() 249 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints() 260 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints() 275 i = ptrace(PPC_PTRACE_GETHWDBGINFO, child_pid, NULL, &dbginfo); in launch_tests() 291 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() [all …]
|
/tools/testing/selftests/pidfd/ |
D | pidfd_poll_test.c | 49 int child_pid = fork(); in main() local 51 if (child_pid < 0) { in main() 61 if (child_pid == 0) { in main() 68 pidfd = sys_pidfd_open(child_pid, 0); in main() 108 if (waitpid(child_pid, NULL, 0) < 0) in main()
|
/tools/testing/selftests/breakpoints/ |
D | breakpoint_test.c | 33 static pid_t child_pid; variable 46 ret = ptrace(PTRACE_POKEUSER, child_pid, in set_breakpoint_addr() 88 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, in toggle_breakpoint() 108 ret = ptrace(PTRACE_POKEUSER, child_pid, in toggle_breakpoint() 276 child_nr_tests = ptrace(PTRACE_PEEKDATA, child_pid, in check_success() 280 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) in check_success() 299 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_instruction_breakpoints() 321 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints() 377 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() 381 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() [all …]
|
/tools/testing/selftests/powerpc/pmu/ |
D | lib.c | 73 int wait_for_child(pid_t child_pid) in wait_for_child() argument 77 if (waitpid(child_pid, &rc, 0) == -1) { in wait_for_child() 90 int kill_child_and_wait(pid_t child_pid) in kill_child_and_wait() argument 92 kill(child_pid, SIGTERM); in kill_child_and_wait() 94 return wait_for_child(child_pid); in kill_child_and_wait()
|
D | lib.h | 23 extern int kill_child_and_wait(pid_t child_pid); 24 extern int wait_for_child(pid_t child_pid);
|
/tools/testing/selftests/powerpc/pmu/ebb/ |
D | task_event_vs_ebb_test.c | 22 static int setup_child_event(struct event *event, pid_t child_pid) in setup_child_event() argument 30 FAIL_IF(event_open_with_pid(event, child_pid)); in setup_child_event()
|
D | task_event_pinned_vs_ebb_test.c | 22 static int setup_child_event(struct event *event, pid_t child_pid) in setup_child_event() argument 32 FAIL_IF(event_open_with_pid(event, child_pid)); in setup_child_event()
|
/tools/testing/selftests/seccomp/ |
D | seccomp_bpf.c | 747 pid_t child_pid; in TEST() local 749 child_pid = fork(); in TEST() 750 ASSERT_LE(0, child_pid); in TEST() 751 if (child_pid == 0) { in TEST() 756 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in TEST() 766 pid_t child_pid; in TEST() local 768 child_pid = fork(); in TEST() 769 ASSERT_LE(0, child_pid); in TEST() 770 if (child_pid == 0) { in TEST() 775 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in TEST() [all …]
|
/tools/power/cpupower/utils/idle_monitor/ |
D | cpupower-monitor.c | 286 pid_t child_pid; in fork_it() local 289 child_pid = fork(); in fork_it() 295 if (!child_pid) { in fork_it() 300 if (child_pid == -1) { in fork_it() 307 if (waitpid(child_pid, &status, 0) == -1) { in fork_it()
|
/tools/testing/selftests/ |
D | kselftest_harness.h | 700 pid_t child_pid; in __run_test() local 707 child_pid = fork(); in __run_test() 708 if (child_pid < 0) { in __run_test() 711 } else if (child_pid == 0) { in __run_test() 717 waitpid(child_pid, &status, 0); in __run_test()
|
/tools/testing/selftests/x86/ |
D | protection_keys.c | 1240 pid_t child_pid; in test_ptrace_of_child() local 1256 child_pid = fork_lazy_child(); in test_ptrace_of_child() 1257 dprintf1("[%d] child pid: %d\n", getpid(), child_pid); in test_ptrace_of_child() 1259 ret = ptrace(PTRACE_ATTACH, child_pid, ignored, ignored); in test_ptrace_of_child() 1264 ret = waitpid(child_pid, &status, WUNTRACED); in test_ptrace_of_child() 1265 if ((ret != child_pid) || !(WIFSTOPPED(status))) { in test_ptrace_of_child() 1285 ret = ptrace(PTRACE_PEEKDATA, child_pid, ptr, ignored); in test_ptrace_of_child() 1295 ret = ptrace(PTRACE_PEEKDATA, child_pid, plain_ptr, ignored); in test_ptrace_of_child() 1302 ret = ptrace(PTRACE_DETACH, child_pid, ignored, 0); in test_ptrace_of_child() 1305 ret = kill(child_pid, SIGKILL); in test_ptrace_of_child()
|
/tools/perf/ |
D | builtin-stat.c | 145 static volatile pid_t child_pid = -1; variable 454 child_pid = evsel_list->workload.pid; in __run_perf_stat() 509 if (child_pid != -1) in __run_perf_stat() 510 kill(child_pid, SIGTERM); in __run_perf_stat() 562 while (!waitpid(child_pid, &status, WNOHANG)) { in __run_perf_stat() 571 if (child_pid != -1) in __run_perf_stat() 572 wait4(child_pid, &status, 0, &stat_config.ru_data); in __run_perf_stat() 665 if ((child_pid == -1) || stat_config.interval) in skip_signal() 675 child_pid = -1; in skip_signal() 692 if (child_pid != -1) in sig_atexit() [all …]
|
/tools/testing/selftests/filesystems/incfs/ |
D | incfs_test.c | 1313 pid_t child_pid = flush_and_fork(); in concurrent_reads_and_writes_test() local 1315 if (child_pid == 0) { in concurrent_reads_and_writes_test() 1326 } else if (child_pid > 0) { in concurrent_reads_and_writes_test() 1327 child_pids[i] = child_pid; in concurrent_reads_and_writes_test() 1661 pid_t child_pid = flush_and_fork(); in child_procs_waiting_for_data_test() local 1663 if (child_pid == 0) { in child_procs_waiting_for_data_test() 1674 } else if (child_pid > 0) { in child_procs_waiting_for_data_test() 1675 child_pids[i] = child_pid; in child_procs_waiting_for_data_test()
|
/tools/testing/ktest/ |
D | ktest.pl | 2701 my $child_pid; 2718 $child_pid = fork; 2720 child_run_test if (!$child_pid); 2770 kill 9, $child_pid; 2773 waitpid $child_pid, 0;
|
/tools/perf/scripts/python/ |
D | sched-migration.py | 394 common_callchain, parent_comm, parent_pid, child_comm, child_pid): argument
|
/tools/power/x86/turbostat/ |
D | turbostat.c | 5257 pid_t child_pid; in fork_it() local 5269 child_pid = fork(); in fork_it() 5270 if (!child_pid) { in fork_it() 5277 if (child_pid == -1) in fork_it() 5282 if (waitpid(child_pid, &status, 0) == -1) in fork_it()
|