/openbmc/linux/tools/testing/selftests/safesetid/ |
H A D | safesetid-test.c | 269 int wstatus; in test_setuid() local 285 w = waitpid(cpid, &wstatus, WUNTRACED | WCONTINUED); in test_setuid() 290 if (WIFEXITED(wstatus)) { in test_setuid() 291 if (WEXITSTATUS(wstatus) == EXIT_SUCCESS) { in test_setuid() 304 } else if (WIFSIGNALED(wstatus)) { in test_setuid() 305 if (WTERMSIG(wstatus) == 9) { in test_setuid() 311 die("unexpected signal: %d\n", wstatus); in test_setuid() 314 die("unexpected status: %d\n", wstatus); in test_setuid() 316 } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus)); in test_setuid() 325 int wstatus; in test_setgid() local [all …]
|
/openbmc/linux/tools/testing/selftests/rlimits/ |
H A D | rlimits-per-userns.c | 89 int wstatus[NR_CHILDS]; in main() local 110 wstatus[i] = 0; in main() 120 pid_t ret = waitpid(child[i], &wstatus[i], WNOHANG); in main() 122 if (!ret || (!WIFEXITED(wstatus[i]) && !WIFSIGNALED(wstatus[i]))) in main() 145 if (WIFEXITED(wstatus[i])) in main() 147 pid, -child[i], WEXITSTATUS(wstatus[i])); in main() 148 else if (WIFSIGNALED(wstatus[i])) in main() 150 pid, -child[i], WTERMSIG(wstatus[i])); in main() 152 if (WIFSIGNALED(wstatus[i]) && WTERMSIG(wstatus[i]) == SIGUSR1) in main()
|
/openbmc/linux/tools/testing/selftests/proc/ |
H A D | proc-empty-vm.c | 139 int wstatus; in vsyscall() local 171 waitpid(pid, &wstatus, 0); in vsyscall() 172 if (WIFEXITED(wstatus)) { in vsyscall() 173 g_vsyscall = WEXITSTATUS(wstatus); in vsyscall() 175 fprintf(stderr, "error: vsyscall wstatus %08x\n", wstatus); in vsyscall() 399 int wstatus; in main() local 400 waitpid(pid, &wstatus, 0); in main() 401 assert(WIFSTOPPED(wstatus)); in main() 402 assert(WSTOPSIG(wstatus) == SIGSEGV); in main()
|
H A D | proc-loadavg-001.c | 28 int wstatus; in main() local 77 if (waitpid(pid, &wstatus, 0) == -1) in main() 79 if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) == 0) in main()
|
H A D | proc-pid-vm.c | 240 int wstatus; in vsyscall() local 274 waitpid(pid, &wstatus, 0); in vsyscall() 275 if (WIFEXITED(wstatus)) { in vsyscall() 276 g_vsyscall = WEXITSTATUS(wstatus); in vsyscall() 278 fprintf(stderr, "error: wstatus %08x\n", wstatus); in vsyscall()
|
/openbmc/linux/tools/testing/selftests/net/mptcp/ |
H A D | mptcp_inq.c | 545 static int rcheck(int wstatus, const char *what) in rcheck() argument 547 if (WIFEXITED(wstatus)) { in rcheck() 548 if (WEXITSTATUS(wstatus) == 0) in rcheck() 550 fprintf(stderr, "%s exited, status=%d\n", what, WEXITSTATUS(wstatus)); in rcheck() 551 return WEXITSTATUS(wstatus); in rcheck() 552 } else if (WIFSIGNALED(wstatus)) { in rcheck() 553 xerror("%s killed by signal %d\n", what, WTERMSIG(wstatus)); in rcheck() 554 } else if (WIFSTOPPED(wstatus)) { in rcheck() 555 xerror("%s stopped by signal %d\n", what, WSTOPSIG(wstatus)); in rcheck() 563 int e1, e2, wstatus; in main() local [all …]
|
H A D | mptcp_sockopt.c | 791 static int rcheck(int wstatus, const char *what) in rcheck() argument 793 if (WIFEXITED(wstatus)) { in rcheck() 794 if (WEXITSTATUS(wstatus) == 0) in rcheck() 796 fprintf(stderr, "%s exited, status=%d\n", what, WEXITSTATUS(wstatus)); in rcheck() 797 return WEXITSTATUS(wstatus); in rcheck() 798 } else if (WIFSIGNALED(wstatus)) { in rcheck() 799 xerror("%s killed by signal %d\n", what, WTERMSIG(wstatus)); in rcheck() 800 } else if (WIFSTOPPED(wstatus)) { in rcheck() 801 xerror("%s stopped by signal %d\n", what, WSTOPSIG(wstatus)); in rcheck() 828 int e1, e2, wstatus; in main() local [all …]
|
/openbmc/linux/tools/testing/selftests/net/ |
H A D | ipv6_flowlabel_mgr.c | 76 int wstatus; in run_tests() local 142 if (wait(&wstatus) == -1) in run_tests() 144 if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus) != 0) in run_tests() 159 if (wait(&wstatus) == -1) in run_tests() 161 if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus) != 0) in run_tests()
|
/openbmc/linux/tools/testing/selftests/exec/ |
H A D | null-argv.c | 24 int wstatus; in check_result() local 31 if (waitpid(pid, &wstatus, 0) < 0) { in check_result() 36 if (!WIFEXITED(wstatus)) { in check_result() 40 if (WEXITSTATUS(wstatus) != 0) { in check_result()
|
/openbmc/linux/tools/testing/selftests/powerpc/dexcr/ |
H A D | dexcr.c | 84 int wstatus; in await_child_success() local 87 FAIL_IF_EXIT_MSG(waitpid(pid, &wstatus, 0) == -1, "wait failed"); in await_child_success() 88 FAIL_IF_EXIT_MSG(!WIFEXITED(wstatus), "child did not exit cleanly"); in await_child_success() 89 FAIL_IF_EXIT_MSG(WEXITSTATUS(wstatus) != 0, "child exit error"); in await_child_success()
|
/openbmc/linux/tools/testing/selftests/powerpc/signal/ |
H A D | sig_sc_double_restart.c | 144 int wstatus; in test_restart() local 155 if (wait(&wstatus) == -1) { in test_restart() 159 if (!WIFEXITED(wstatus)) { in test_restart() 164 FAIL_IF(WEXITSTATUS(wstatus) != EXIT_SUCCESS); in test_restart()
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | fexit_sleep.c | 28 int wstatus, duration = 0; in test_fexit_sleep() local 73 if (CHECK(waitpid(cpid, &wstatus, 0) == -1, "waitpid", "%s\n", strerror(errno))) in test_fexit_sleep() 75 if (CHECK(WEXITSTATUS(wstatus) != 0, "exitstatus", "failed")) in test_fexit_sleep()
|
H A D | ns_current_pid_tgid.c | 124 int wstatus; in test_ns_current_pid_tgid_new_ns() local 136 if (!ASSERT_NEQ(waitpid(cpid, &wstatus, 0), -1, "waitpid")) in test_ns_current_pid_tgid_new_ns() 139 if (!ASSERT_OK(WEXITSTATUS(wstatus), "newns_pidtgid")) in test_ns_current_pid_tgid_new_ns()
|
H A D | bpf_iter.c | 1473 int wstatus, child_pid = -1; in test_task_vma_dead_task() local 1536 waitpid(child_pid, &wstatus, 0); in test_task_vma_dead_task()
|
/openbmc/linux/tools/testing/selftests/x86/ |
H A D | syscall_numbering.c | 398 int wstatus; in syscall_numbering_tracer() local 401 pid_t wpid = waitpid(testpid, &wstatus, 0); in syscall_numbering_tracer() 406 if (!WIFSTOPPED(wstatus)) in syscall_numbering_tracer() 409 if (sh->probing_syscall && WSTOPSIG(wstatus) == SIGTRAP) in syscall_numbering_tracer() 417 while (waitpid(testpid, &wstatus, 0) != testpid || !WIFEXITED(wstatus)) in syscall_numbering_tracer()
|
/openbmc/linux/tools/tracing/rtla/src/ |
H A D | timerlat_u.c | 144 int wstatus; in timerlat_u_dispatcher() local 188 pid = waitpid(-1, &wstatus, WNOHANG); in timerlat_u_dispatcher() 207 pid = waitpid(-1, &wstatus, 0); in timerlat_u_dispatcher()
|
/openbmc/linux/tools/testing/selftests/kvm/ |
H A D | get-reg-list.c | 392 int wstatus; in main() local 393 pid_t wpid = wait(&wstatus); in main() 394 TEST_ASSERT(wpid == pid && WIFEXITED(wstatus), "wait: Unexpected return"); in main() 395 if (WEXITSTATUS(wstatus) && WEXITSTATUS(wstatus) != KSFT_SKIP) in main()
|
/openbmc/openbmc/poky/meta/recipes-devtools/patch/patch/ |
H A D | 0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch | 141 + int wstatus; 142 + if (waitpid (pid, &wstatus, 0) == -1 143 + || ! WIFEXITED (wstatus) 144 + || WEXITSTATUS (wstatus) != 0)
|
/openbmc/qemu/tests/qtest/ |
H A D | libqtest.c | 79 int wstatus; member 161 pid = waitpid(pid, &s->wstatus, WNOHANG); in qtest_probe_child() 192 int wstatus = s->wstatus; in qtest_check_status() local 193 if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != s->expected_status) { in qtest_check_status() 196 __FILE__, __LINE__, WEXITSTATUS(wstatus), s->expected_status); in qtest_check_status() 198 } else if (WIFSIGNALED(wstatus)) { in qtest_check_status() 199 int sig = WTERMSIG(wstatus); in qtest_check_status() 201 const char *dump = WCOREDUMP(wstatus) ? " (core dumped)" : ""; in qtest_check_status() 229 pid = waitpid(s->qemu_pid, &s->wstatus, WNOHANG); in qtest_wait_qemu() 238 pid = RETRY_ON_EINTR(waitpid(s->qemu_pid, &s->wstatus, 0)); in qtest_wait_qemu() [all …]
|
H A D | vhost-user-blk-test.c | 863 int wstatus; in quit_storage_daemon() local 878 pid = waitpid(qsd->pid, &wstatus, 0); in quit_storage_daemon() 880 if (!WIFEXITED(wstatus)) { in quit_storage_daemon() 885 if (WEXITSTATUS(wstatus) != 0) { in quit_storage_daemon() 888 __func__, WEXITSTATUS(wstatus)); in quit_storage_daemon()
|
H A D | migration-test.c | 1655 int pid, wstatus; in test_analyze_script() local 1691 g_assert(waitpid(pid, &wstatus, 0) == pid); in test_analyze_script() 1692 if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus) != 0) { in test_analyze_script()
|
/openbmc/linux/tools/testing/selftests/mm/ |
H A D | khugepaged.c | 1178 int wstatus; in collapse_fork() local 1210 wait(&wstatus); in collapse_fork() 1211 exit_status += WEXITSTATUS(wstatus); in collapse_fork() 1224 int wstatus; in collapse_fork_compound() local 1259 wait(&wstatus); in collapse_fork_compound() 1260 exit_status += WEXITSTATUS(wstatus); in collapse_fork_compound() 1274 int wstatus; in collapse_max_ptes_shared() local 1319 wait(&wstatus); in collapse_max_ptes_shared() 1320 exit_status += WEXITSTATUS(wstatus); in collapse_max_ptes_shared()
|
/openbmc/linux/drivers/usb/class/ |
H A D | usblp.c | 155 int wstatus; /* bytes written or error */ member 189 dev_dbg(dev, "wstatus=%d\n", usblp->wstatus); in usblp_dump() 346 usblp->wstatus = status; in usblp_bulk_write() 348 usblp->wstatus = urb->actual_length; in usblp_bulk_write() 444 usblp->wstatus = 0; in usblp_open() 780 usblp->wstatus = 0; in usblp_write() 810 if (usblp->wstatus < 0) { in usblp_write() 818 writecount += usblp->wstatus; in usblp_write()
|
/openbmc/linux/tools/testing/selftests/memfd/ |
H A D | memfd_test.c | 789 int wstatus; in join_thread() local 791 if (waitpid(pid, &wstatus, 0) < 0) { in join_thread() 796 if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != 0) { in join_thread() 798 WEXITSTATUS(wstatus)); in join_thread() 802 if (WIFSIGNALED(wstatus)) { in join_thread() 804 WTERMSIG(wstatus)); in join_thread()
|
/openbmc/qemu/linux-user/ |
H A D | strace.c | 4320 static void print_wstatus(int wstatus) in print_wstatus() argument 4322 if (WIFSIGNALED(wstatus)) { in print_wstatus() 4324 print_signal(WTERMSIG(wstatus), 1); in print_wstatus() 4325 if (WCOREDUMP(wstatus)) { in print_wstatus() 4329 } else if (WIFEXITED(wstatus)) { in print_wstatus() 4331 WEXITSTATUS(wstatus)); in print_wstatus() 4333 print_number(wstatus, 1); in print_wstatus() 4339 int wstatus; in print_ret_wstatus() local 4343 && get_user_s32(wstatus, wstatus_addr)) { in print_ret_wstatus() 4345 print_wstatus(wstatus); in print_ret_wstatus()
|