Home
last modified time | relevance | path

Searched refs:child_pid (Results 1 – 16 of 16) sorted by relevance

/tools/testing/selftests/powerpc/ptrace/
Dptrace-hwbreak.c32 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/
Dpidfd_poll_test.c49 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/
Dbreakpoint_test.c33 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/
Dlib.c73 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()
Dlib.h23 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/
Dtask_event_vs_ebb_test.c22 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()
Dtask_event_pinned_vs_ebb_test.c22 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/
Dseccomp_bpf.c747 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/
Dcpupower-monitor.c286 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/
Dkselftest_harness.h700 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/
Dprotection_keys.c1240 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/
Dbuiltin-stat.c145 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/
Dincfs_test.c1313 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/
Dktest.pl2701 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/
Dsched-migration.py394 common_callchain, parent_comm, parent_pid, child_comm, child_pid): argument
/tools/power/x86/turbostat/
Dturbostat.c5257 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()