Home
last modified time | relevance | path

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

12

/linux-6.6.21/tools/testing/selftests/powerpc/ptrace/
Dptrace-hwbreak.c52 static void get_dbginfo(pid_t child_pid, struct ppc_debug_info *dbginfo) in get_dbginfo() argument
54 if (ptrace(PPC_PTRACE_GETHWDBGINFO, child_pid, NULL, dbginfo)) { in get_dbginfo()
212 static void check_success(pid_t child_pid, const char *name, const char *type, in check_success() argument
224 ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &siginfo); in check_success()
241 ptrace(PTRACE_SINGLESTEP, child_pid, NULL, 0); in check_success()
246 static void ptrace_set_debugreg(pid_t child_pid, unsigned long wp_addr) in ptrace_set_debugreg() argument
248 if (ptrace(PTRACE_SET_DEBUGREG, child_pid, 0, wp_addr)) { in ptrace_set_debugreg()
254 static int ptrace_sethwdebug(pid_t child_pid, struct ppc_hw_breakpoint *info) in ptrace_sethwdebug() argument
256 int wh = ptrace(PPC_PTRACE_SETHWDEBUG, child_pid, 0, info); in ptrace_sethwdebug()
265 static void ptrace_delhwdebug(pid_t child_pid, int wh) in ptrace_delhwdebug() argument
[all …]
/linux-6.6.21/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 …]
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dcpumask.c28 pid_t child_pid; in verify_success() local
50 child_pid = fork(); in verify_success()
51 if (!ASSERT_GT(child_pid, -1, "child_pid")) in verify_success()
53 if (child_pid == 0) in verify_success()
55 waitpid(child_pid, &status, 0); in verify_success()
Dtask_kfunc.c38 pid_t child_pid; in run_success_test() local
57 child_pid = fork(); in run_success_test()
58 if (!ASSERT_GT(child_pid, -1, "child_pid")) in run_success_test()
60 if (child_pid == 0) in run_success_test()
62 waitpid(child_pid, &status, 0); in run_success_test()
Dtest_bprm_opts.c34 int child_pid, child_status, ret, null_fd; in run_set_secureexec() local
36 child_pid = fork(); in run_set_secureexec()
37 if (child_pid == 0) { in run_set_secureexec()
65 } else if (child_pid > 0) { in run_set_secureexec()
66 waitpid(child_pid, &child_status, 0); in run_set_secureexec()
Dtest_lsm.c39 int child_pid, child_status; in exec_cmd() local
41 child_pid = fork(); in exec_cmd()
42 if (child_pid == 0) { in exec_cmd()
46 } else if (child_pid > 0) { in exec_cmd()
47 waitpid(child_pid, &child_status, 0); in exec_cmd()
Dverify_pkcs7_sig.c79 int child_pid, child_status; in _run_setup_process() local
81 child_pid = fork(); in _run_setup_process()
82 if (child_pid == 0) { in _run_setup_process()
87 } else if (child_pid > 0) { in _run_setup_process()
88 waitpid(child_pid, &child_status, 0); in _run_setup_process()
100 int ret, fd, child_status, child_pid; in populate_data_item_str() local
118 child_pid = fork(); in populate_data_item_str()
120 if (child_pid == -1) { in populate_data_item_str()
125 if (child_pid == 0) { in populate_data_item_str()
132 waitpid(child_pid, &child_status, 0); in populate_data_item_str()
Dtest_local_storage.c28 int child_pid, child_status, ret; in run_self_unlink() local
31 child_pid = fork(); in run_self_unlink()
32 if (child_pid == 0) { in run_self_unlink()
45 } else if (child_pid > 0) { in run_self_unlink()
46 waitpid(child_pid, &child_status, 0); in run_self_unlink()
Dtest_ima.c21 int child_pid, child_status; in _run_measured_process() local
23 child_pid = fork(); in _run_measured_process()
24 if (child_pid == 0) { in _run_measured_process()
30 } else if (child_pid > 0) { in _run_measured_process()
31 waitpid(child_pid, &child_status, 0); in _run_measured_process()
/linux-6.6.21/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()
/linux-6.6.21/tools/testing/selftests/powerpc/pmu/
Dlib.c60 int wait_for_child(pid_t child_pid) in wait_for_child() argument
64 if (waitpid(child_pid, &rc, 0) == -1) { in wait_for_child()
77 int kill_child_and_wait(pid_t child_pid) in kill_child_and_wait() argument
79 kill(child_pid, SIGTERM); in kill_child_and_wait()
81 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);
/linux-6.6.21/tools/testing/selftests/bpf/progs/
Duprobe_multi.c24 int child_pid = 0; variable
39 child_pid = bpf_get_current_pid_tgid() >> 32; in uprobe_multi_check()
41 if (pid && child_pid != pid) in uprobe_multi_check()
/linux-6.6.21/tools/testing/selftests/cgroup/
Dtest_zswap.c159 pid_t child_pid; in test_no_kmem_bypass() local
191 child_pid = cg_run_nowait(test_group, no_kmem_bypass_child, values); in test_no_kmem_bypass()
192 if (child_pid < 0) in test_no_kmem_bypass()
224 kill(child_pid, SIGTERM); in test_no_kmem_bypass()
225 waitpid(child_pid, &child_status, 0); in test_no_kmem_bypass()
Dtest_core.c82 int child_pid; in test_cgcore_destroy() local
94 child_pid = cg_run_nowait(cg_test, alloc_and_touch_anon_noexit, in test_cgcore_destroy()
97 if (child_pid < 0) in test_cgcore_destroy()
119 if (waitpid(child_pid, NULL, 0) < 0) in test_cgcore_destroy()
/linux-6.6.21/tools/testing/selftests/net/
Dfin_ack_lat.c15 static int child_pid; variable
106 kill(SIGTERM, child_pid); in sig_handler()
144 child_pid = fork(); in main()
145 if (!child_pid) in main()
/linux-6.6.21/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()
/linux-6.6.21/tools/testing/selftests/seccomp/
Dseccomp_bpf.c867 pid_t child_pid; in TEST() local
869 child_pid = fork(); in TEST()
870 ASSERT_LE(0, child_pid); in TEST()
871 if (child_pid == 0) { in TEST()
876 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in TEST()
886 pid_t child_pid; in TEST() local
888 child_pid = fork(); in TEST()
889 ASSERT_LE(0, child_pid); in TEST()
890 if (child_pid == 0) { in TEST()
895 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in TEST()
[all …]
/linux-6.6.21/tools/testing/selftests/mm/
Dksm_functional_tests.c445 pid_t child_pid; in test_prctl_fork() local
458 child_pid = fork(); in test_prctl_fork()
459 if (!child_pid) { in test_prctl_fork()
461 } else if (child_pid < 0) { in test_prctl_fork()
466 if (waitpid(child_pid, &status, 0) < 0) { in test_prctl_fork()
Dprotection_keys.c1376 pid_t child_pid; in test_ptrace_of_child() local
1392 child_pid = fork_lazy_child(); in test_ptrace_of_child()
1393 dprintf1("[%d] child pid: %d\n", getpid(), child_pid); in test_ptrace_of_child()
1395 ret = ptrace(PTRACE_ATTACH, child_pid, ignored, ignored); in test_ptrace_of_child()
1400 ret = waitpid(child_pid, &status, WUNTRACED); in test_ptrace_of_child()
1401 if ((ret != child_pid) || !(WIFSTOPPED(status))) { in test_ptrace_of_child()
1421 ret = ptrace(PTRACE_PEEKDATA, child_pid, ptr, ignored); in test_ptrace_of_child()
1431 ret = ptrace(PTRACE_PEEKDATA, child_pid, plain_ptr, ignored); in test_ptrace_of_child()
1438 ret = ptrace(PTRACE_DETACH, child_pid, ignored, 0); in test_ptrace_of_child()
1441 ret = kill(child_pid, SIGKILL); in test_ptrace_of_child()
/linux-6.6.21/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()
/linux-6.6.21/drivers/hid/
Dhid-elo.c194 u16 child_vid, child_pid; in elo_broken_firmware() local
205 child_pid = le16_to_cpu(child->descriptor.idProduct); in elo_broken_firmware()
215 switch (child_pid) { in elo_broken_firmware()
/linux-6.6.21/tools/perf/
Dbuiltin-stat.c115 static volatile sig_atomic_t child_pid = -1; variable
605 child_exited = waitpid(child_pid, &status, WNOHANG); in dispatch_events()
684 if (child_pid != -1) in stat_handle_error()
685 kill(child_pid, SIGTERM); in stat_handle_error()
711 child_pid = evsel_list->workload.pid; in __run_perf_stat()
889 if (child_pid != -1) { in __run_perf_stat()
891 kill(child_pid, SIGTERM); in __run_perf_stat()
892 wait4(child_pid, &status, 0, &stat_config.ru_data); in __run_perf_stat()
988 if ((child_pid == -1) || stat_config.interval) in skip_signal()
998 child_pid = -1; in skip_signal()
[all …]
/linux-6.6.21/include/uapi/linux/
Dcn_proc.h102 __kernel_pid_t child_pid; member

12