| /linux/tools/testing/selftests/powerpc/ptrace/ |
| H A D | ptrace-hwbreak.c | 52 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/tools/testing/selftests/namespaces/ |
| H A D | regression_pidfd_setns_test.c | 34 pid_t child_pid; in TEST() local 46 child_pid = create_child(&pidfd, 0); in TEST() 47 ASSERT_GE(child_pid, 0); in TEST() 49 if (child_pid == 0) { in TEST() 87 pid_t child_pid; in TEST() local 95 child_pid = create_child(&pidfd, CLONE_NEWUSER | CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWNET); in TEST() 96 ASSERT_GE(child_pid, 0); in TEST() 98 if (child_pid == 0) { in TEST()
|
| H A D | nsid_test.c | 27 pid_t child_pid; in FIXTURE() local 32 self->child_pid = 0; in FIXTURE_SETUP() 46 if (self->child_pid > 0) { in TEST() 47 kill(self->child_pid, SIGKILL); in TEST() 48 waitpid(self->child_pid, NULL, 0); in TEST() 123 self->child_pid = pid; in TEST_F() 229 self->child_pid = pid; in TEST_F() 335 self->child_pid = pid; in TEST_F() 441 self->child_pid = pid; in TEST_F() 547 self->child_pid in TEST_F() [all...] |
| /linux/tools/testing/selftests/mm/ |
| H A D | process_madv.c | 23 pid_t child_pid; in FIXTURE() local 33 self->child_pid = -1; in FIXTURE_SETUP() 39 if (self->child_pid > 0) { in FIXTURE_TEARDOWN_PARENT() 40 kill(self->child_pid, SIGKILL); in FIXTURE_TEARDOWN_PARENT() 41 waitpid(self->child_pid, NULL, 0); in FIXTURE_TEARDOWN_PARENT() 150 self->child_pid = fork(); in TEST_F() 151 ASSERT_NE(self->child_pid, -1); in TEST_F() 153 if (self->child_pid == 0) { in TEST_F() 183 waitpid(self->child_pid, NULL, 0); in TEST_F() 188 self->child_pid in TEST_F() [all...] |
| H A D | ksm_functional_tests.c | 457 pid_t child_pid; in test_prctl_fork() local 470 child_pid = fork(); in test_prctl_fork() 471 if (!child_pid) { in test_prctl_fork() 474 } else if (child_pid < 0) { in test_prctl_fork() 479 if (waitpid(child_pid, &status, 0) < 0) { in test_prctl_fork() 544 pid_t child_pid; in test_prctl_fork_exec() 560 child_pid = fork(); in test_prctl_fork_exec() 561 if (child_pid == -1) { in test_prctl_fork_exec() 564 } else if (child_pid == 0) { in test_prctl_fork_exec() 572 if (waitpid(child_pid, in test_prctl_fork_exec() 541 pid_t child_pid; test_prctl_fork_exec() local 659 pid_t child_pid; test_fork_ksm_merging_page_count() local [all...] |
| H A D | pkey_sighandler_tests.c | 289 int child_pid = 0; in test_sigsegv_handler_with_different_pkey_for_stack() local 332 &child_pid); in test_sigsegv_handler_with_different_pkey_for_stack() 445 int child_pid = 0; in test_pkru_sigreturn() local 503 &child_pid); in test_pkru_sigreturn() 513 child_pid = ret; in test_pkru_sigreturn() 517 ret = syscall_raw(SYS_tkill, child_pid, 0, 0, 0, 0, 0); in test_pkru_sigreturn()
|
| /linux/tools/testing/selftests/breakpoints/ |
| H A 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 …]
|
| /linux/tools/testing/selftests/pidfd/ |
| H A D | pidfd_setattr_test.c | 29 pid_t child_pid; in FIXTURE() local 35 self->child_pid = create_child(&self->child_pidfd, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP() 36 EXPECT_GE(self->child_pid, 0); in FIXTURE_SETUP() 38 if (self->child_pid == 0) in FIXTURE_SETUP() 44 sys_waitid(P_PID, self->child_pid, NULL, WEXITED); in FIXTURE_TEARDOWN()
|
| H A 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()
|
| H A D | pidfd_xattr_test.c | 29 pid_t child_pid; in FIXTURE() local 35 self->child_pid = create_child(&self->child_pidfd, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP() 36 EXPECT_GE(self->child_pid, 0); in FIXTURE_SETUP() 38 if (self->child_pid == 0) in FIXTURE_SETUP() 44 sys_waitid(P_PID, self->child_pid, NULL, WEXITED); in FIXTURE_TEARDOWN() 119 self->child_pidfd = sys_pidfd_open(self->child_pid, 0); in TEST_F()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | cpumask.c | 39 pid_t child_pid; in verify_success() 61 child_pid = fork(); in verify_success() 62 if (!ASSERT_GT(child_pid, -1, "child_pid")) in verify_success() 64 if (child_pid == 0) in verify_success() 66 waitpid(child_pid, &status, 0); in verify_success() 35 pid_t child_pid; verify_success() local
|
| H A D | test_bprm_opts.c | 34 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()
|
| H A D | test_lsm.c | 18 int child_pid, child_status; 20 child_pid = fork(); 21 if (child_pid == 0) { 25 } else if (child_pid > 0) { in stack_mprotect() 26 waitpid(child_pid, &child_status, 0); in stack_mprotect() 40 int child_pid, child_status; exec_cmd() local
|
| H A D | test_local_storage.c | 28 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()
|
| H A D | verify_pkcs7_sig.c | 64 int child_pid, child_status; 66 child_pid = fork(); 67 if (child_pid == 0) { 72 } else if (child_pid > 0) { in libbpf_print_cb() 73 waitpid(child_pid, &child_status, 0); in libbpf_print_cb() 85 int ret, fd, child_status, child_pid; in _run_setup_process() 103 child_pid = fork(); in populate_data_item_str() 105 if (child_pid == -1) { in populate_data_item_str() 110 if (child_pid == 0) { in populate_data_item_str() 117 waitpid(child_pid, in populate_data_item_str() 86 int child_pid, child_status; _run_setup_process() local 107 int ret, fd, child_status, child_pid; populate_data_item_str() local [all...] |
| H A D | test_ima.c | 21 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()
|
| H A D | task_local_storage.c | 268 pid_t child_pid, my_tid; in test_uptr_basic() 298 child_pid = fork(); in test_uptr_basic() 299 if (!ASSERT_NEQ(child_pid, -1, "fork")) in test_uptr_basic() 306 if (child_pid == 0) { in test_uptr_basic() 315 /* Wait for the parent to set child_pid */ in test_uptr_basic() 321 skel->bss->target_pid = child_pid; in test_uptr_basic() 325 err = waitpid(child_pid, NULL, 0); in test_uptr_basic() 326 ASSERT_EQ(err, child_pid, "waitpid"); in test_uptr_basic() 261 pid_t child_pid, my_tid; test_uptr_basic() local
|
| /linux/tools/testing/selftests/acct/ |
| H A D | acct_syscall.c | 18 pid_t child_pid; in main() local 52 child_pid = fork(); in main() 54 if (child_pid < 0) { in main() 58 } else if (child_pid > 0) { in main()
|
| /linux/tools/testing/selftests/powerpc/pmu/ |
| H A D | lib.c | 60 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()
|
| H A D | lib.h | 23 extern int kill_child_and_wait(pid_t child_pid); 24 extern int wait_for_child(pid_t child_pid);
|
| /linux/tools/testing/selftests/tty/ |
| H A D | tty_tiocsti_test.c | 569 pid_t child_pid; in TEST_F() local 573 child_pid = fork(); in TEST_F() 574 ASSERT_GE(child_pid, 0); in TEST_F() 577 if (child_pid == 0) in TEST_F() 586 child_pid = fork(); in TEST_F() 587 ASSERT_GE(child_pid, 0); in TEST_F() 589 if (child_pid == 0) { in TEST_F() 637 ASSERT_EQ(waitpid(child_pid, &status, 0), child_pid); in TEST_F()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | uprobe_multi.c | 24 int child_pid = 0; variable 56 child_pid = cur_pid_tgid >> 32; in uprobe_multi_check()
|
| /linux/tools/testing/selftests/net/ |
| H A D | fin_ack_lat.c | 15 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/tools/testing/selftests/powerpc/pmu/ebb/ |
| H A 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()
|
| H A 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()
|