| /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 …]
|
| /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()
|
| /linux/tools/testing/selftests/futex/functional/ |
| H A D | robust_list.c | 212 int ret, pid, wstatus; in TEST() local 238 wait(&wstatus); in TEST() 242 if (!WEXITSTATUS(wstatus)) in TEST() 332 int ret, wstatus; in TEST() local 351 wait(&wstatus); in TEST() 356 if (!WEXITSTATUS(wstatus)) in TEST() 396 int ret, wstatus; in TEST() local 414 wait(&wstatus); in TEST() 418 if (!WEXITSTATUS(wstatus)) in TEST() 478 int i, ret, wstatus; in TEST() local [all …]
|
| /linux/tools/testing/selftests/net/mptcp/ |
| H A D | mptcp_inq.c | 555 static int rcheck(int wstatus, const char *what) in rcheck() 557 if (WIFEXITED(wstatus)) { in rcheck() 558 if (WEXITSTATUS(wstatus) == 0) in rcheck() 560 fprintf(stderr, "%s exited, status=%d\n", what, WEXITSTATUS(wstatus)); in rcheck() 561 return WEXITSTATUS(wstatus); in rcheck() 562 } else if (WIFSIGNALED(wstatus)) { in rcheck() 563 xerror("%s killed by signal %d\n", what, WTERMSIG(wstatus)); in rcheck() 564 } else if (WIFSTOPPED(wstatus)) { in rcheck() 565 xerror("%s stopped by signal %d\n", what, WSTOPSIG(wstatus)); in rcheck() 573 int e1, e2, wstatus; in main() 554 rcheck(int wstatus,const char * what) rcheck() argument 572 int e1, e2, wstatus; main() local [all...] |
| H A D | mptcp_sockopt.c | 805 static int rcheck(int wstatus, const char *what) in rcheck() argument 807 if (WIFEXITED(wstatus)) { in rcheck() 808 if (WEXITSTATUS(wstatus) == 0) in rcheck() 810 fprintf(stderr, "%s exited, status=%d\n", what, WEXITSTATUS(wstatus)); in rcheck() 811 return WEXITSTATUS(wstatus); in rcheck() 812 } else if (WIFSIGNALED(wstatus)) { in rcheck() 813 xerror("%s killed by signal %d\n", what, WTERMSIG(wstatus)); in rcheck() 814 } else if (WIFSTOPPED(wstatus)) { in rcheck() 815 xerror("%s stopped by signal %d\n", what, WSTOPSIG(wstatus)); in rcheck() 842 int e1, e2, wstatus; in main() local [all …]
|
| /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()
|
| /linux/tools/testing/selftests/proc/ |
| 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-empty-vm.c | 174 int wstatus; in vsyscall() local 206 waitpid(pid, &wstatus, 0); in vsyscall() 207 if (WIFEXITED(wstatus)) { in vsyscall() 208 g_vsyscall = WEXITSTATUS(wstatus); in vsyscall() 210 fprintf(stderr, "error: vsyscall wstatus %08x\n", wstatus); in vsyscall() 528 int wstatus; in main() local 529 waitpid(pid, &wstatus, 0); in main() 530 assert(WIFSTOPPED(wstatus)); in main() 531 assert(WSTOPSIG(wstatus) == SIGSEGV); in main()
|
| H A D | proc-pidns.c | 83 int wstatus; in FIXTURE_SETUP() local 84 ASSERT_EQ(waitpid(pid, &wstatus, 0), pid); in FIXTURE_SETUP() 85 ASSERT_TRUE(WIFEXITED(wstatus)); in FIXTURE_SETUP() 86 ASSERT_EQ(WEXITSTATUS(wstatus), 0); in FIXTURE_SETUP()
|
| H A D | proc-pid-vm.c | 245 int wstatus; in vsyscall() local 279 waitpid(pid, &wstatus, 0); in vsyscall() 280 if (WIFEXITED(wstatus)) { in vsyscall() 281 g_vsyscall = WEXITSTATUS(wstatus); in vsyscall() 283 fprintf(stderr, "error: wstatus %08x\n", wstatus); in vsyscall()
|
| /linux/tools/testing/selftests/filesystems/ |
| H A D | file_stressor.c | 90 int wstatus; in FIXTURE_TEARDOWN() local 93 pid = waitpid(self->pids_openers[i], &wstatus, 0); in FIXTURE_TEARDOWN() 95 ASSERT_TRUE(!WIFEXITED(wstatus) || !WIFSIGNALED(wstatus)); in FIXTURE_TEARDOWN() 97 pid = waitpid(self->pids_getdents[i], &wstatus, 0); in FIXTURE_TEARDOWN() 99 ASSERT_TRUE(!WIFEXITED(wstatus) || !WIFSIGNALED(wstatus)); in FIXTURE_TEARDOWN()
|
| /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()
|
| /linux/tools/testing/selftests/powerpc/dexcr/ |
| H A D | dexcr.c | 124 int wstatus; in await_child_success() local 127 FAIL_IF_EXIT_MSG(waitpid(pid, &wstatus, 0) == -1, "wait failed"); in await_child_success() 128 FAIL_IF_EXIT_MSG(!WIFEXITED(wstatus), "child did not exit cleanly"); in await_child_success() 129 FAIL_IF_EXIT_MSG(WEXITSTATUS(wstatus) != 0, "child exit error"); in await_child_success()
|
| /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()
|
| /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 | 184 int wstatus; in test_ns_current_pid_tgid_new_ns() local 196 if (!ASSERT_NEQ(waitpid(cpid, &wstatus, 0), -1, "waitpid")) in test_ns_current_pid_tgid_new_ns() 199 if (!ASSERT_OK(WEXITSTATUS(wstatus), "newns_pidtgid")) in test_ns_current_pid_tgid_new_ns()
|
| H A D | bpf_iter.c | 1553 int wstatus, child_pid = -1; in test_task_vma_dead_task() local 1616 waitpid(child_pid, &wstatus, 0); in test_task_vma_dead_task()
|
| /linux/tools/testing/selftests/x86/ |
| H A D | syscall_numbering.c | 399 int wstatus; in syscall_numbering_tracer() local 402 pid_t wpid = waitpid(testpid, &wstatus, 0); in syscall_numbering_tracer() 407 if (!WIFSTOPPED(wstatus)) in syscall_numbering_tracer() 410 if (sh->probing_syscall && WSTOPSIG(wstatus) == SIGTRAP) in syscall_numbering_tracer() 418 while (waitpid(testpid, &wstatus, 0) != testpid || !WIFEXITED(wstatus)) in syscall_numbering_tracer()
|
| /linux/tools/tracing/rtla/src/ |
| H A D | timerlat_u.c | 140 int wstatus; in timerlat_u_dispatcher() local 184 pid = waitpid(-1, &wstatus, WNOHANG); in timerlat_u_dispatcher() 203 pid = waitpid(-1, &wstatus, 0); in timerlat_u_dispatcher()
|
| /linux/tools/testing/selftests/kvm/ |
| H A D | get-reg-list.c | 396 int wstatus; in main() 397 pid_t wpid = wait(&wstatus); in main() 398 TEST_ASSERT(wpid == pid && WIFEXITED(wstatus), "wait: Unexpected return"); in main() 399 if (WEXITSTATUS(wstatus) && WEXITSTATUS(wstatus) != KSFT_SKIP) in main() 393 int wstatus; main() local
|
| /linux/tools/testing/selftests/mm/ |
| H A D | khugepaged.c | 886 int wstatus; in collapse_fork() local 918 wait(&wstatus); in collapse_fork() 919 exit_status += WEXITSTATUS(wstatus); in collapse_fork() 932 int wstatus; in collapse_fork_compound() local 967 wait(&wstatus); in collapse_fork_compound() 968 exit_status += WEXITSTATUS(wstatus); in collapse_fork_compound() 982 int wstatus; in collapse_max_ptes_shared() local 1027 wait(&wstatus); in collapse_max_ptes_shared() 1028 exit_status += WEXITSTATUS(wstatus); in collapse_max_ptes_shared()
|
| /linux/tools/testing/selftests/memfd/ |
| H A D | memfd_test.c | 801 int wstatus; in join_thread() local 803 if (waitpid(pid, &wstatus, 0) < 0) { in join_thread() 808 if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != 0) { in join_thread() 810 WEXITSTATUS(wstatus)); in join_thread() 814 if (WIFSIGNALED(wstatus)) { in join_thread() 816 WTERMSIG(wstatus)); in join_thread()
|
| /linux/tools/testing/selftests/coredump/ |
| H A D | coredump_socket_protocol_test.c | 1526 int wstatus; variable 1527 if (waitpid(worker_pids[i], &wstatus, 0) < 0) { 1529 } else if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != EXIT_SUCCESS) { 1530 fprintf(stderr, "Worker %d exited with error code %d\n", worker_pids[i], WEXITSTATUS(wstatus));
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_progs.c | 1742 int wstatus, pid; in worker_main_send_log() 1744 pid = waitpid(env.worker_pids[i], &wstatus, 0); in worker_main_send_log() 1728 int wstatus, pid; server_main() local
|
| /linux/tools/testing/selftests/seccomp/ |
| H A D | seccomp_bpf.c | 4461 int wstatus; in TEST_F() local 4464 ASSERT_EQ(self->pid, wait(&wstatus)); in TEST_F()
|