/kernel/linux/linux-5.10/tools/testing/selftests/kcmp/ |
H A D | kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp() 35 int pid1, pid2; in main() local 81 pid2 = fork(); in main() 82 if (pid2 < 0) { in main() 87 if (!pid2) { in main() 88 int pid2 = getpid(); in main() local 98 printf("pid1: %6d pid2: %6d FD: %2ld FILES: %2ld VM: %2ld " in main() 101 pid1, pid2, in main() 102 sys_kcmp(pid1, pid2, KCMP_FIL in main() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/kcmp/ |
H A D | kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp() 35 int pid1, pid2; in main() local 81 pid2 = fork(); in main() 82 if (pid2 < 0) { in main() 87 if (!pid2) { in main() 88 int pid2 = getpid(); in main() local 101 printf("pid1: %6d pid2: %6d FD: %2ld FILES: %2ld VM: %2ld " in main() 104 pid1, pid2, in main() 105 sys_kcmp(pid1, pid2, KCMP_FIL in main() [all...] |
/third_party/curl/tests/ |
H A D | servers.pm | 403 my $pid2 = 0; 406 $pid2 = pidfromfile($pidfile); 407 if(($pid2 > 0) && pidexists($pid2)) { 408 # if $pid2 is valid, then make sure this pid is alive, as 429 return ($child, $pid2); 1171 my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0); 1176 stopserver($server, "$pid2"); 1192 stopserver($server, "$httppid $pid2"); 1196 $pid2 [all...] |
/third_party/ltp/testcases/kernel/syscalls/kcmp/ |
H A D | kcmp01.c | 27 static int pid2; variable 31 int *pid2; member 38 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 39 {&pid1, &pid2, KCMP_FILE, &fd1, &fd1, 0}, 40 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 41 {&pid1, &pid2, KCMP_FILE, &fd1, &fd3, 1}, 57 pid2 = getpid(); in do_child() 68 TEST(kcmp(*(test->pid1), *(test->pid2), test->type, in do_child() 95 pid2 in verify_kcmp() [all...] |
H A D | kcmp03.c | 29 static int pid2; variable 54 pid2 = getpid(); in do_child() 56 TEST(kcmp(pid1, pid2, *(int *)arg, 0, 0)); in do_child()
|
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
H A D | getprocpid.c | 34 pid_t pid2 = getprocpid(); in getprocpid_0100() local 35 EXPECT_EQ("getprocpid_0100", pid1, pid2); in getprocpid_0100() 51 pid_t pid2 = getprocpid(); in getprocpid_0200() local 52 if (pid2 != getpid()) { in getprocpid_0200() 105 pid_t pid2 = gettid(); in pthread_func() local 106 if (pid1 != pid2) { in pthread_func() 145 pid_t pid2 = getproctid(); in getproctid_0200() local 146 if (pid2 != gettid()) { in getproctid_0200()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | tc_links.c | 19 __u32 pid1, pid2, lid1, lid2; in serial_test_tc_links_basic() local 29 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_links_basic() 31 ASSERT_NEQ(pid1, pid2, "prog_ids_1_2"); in serial_test_tc_links_basic() 96 ASSERT_EQ(optq.prog_ids[0], pid2, "prog_ids[0]"); in serial_test_tc_links_basic() 118 __u32 pid1, pid2, pid3, pid4; in test_tc_links_before_target() local 142 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in test_tc_links_before_target() 146 ASSERT_NEQ(pid1, pid2, "prog_ids_1_2"); in test_tc_links_before_target() 148 ASSERT_NEQ(pid2, pid3, "prog_ids_2_3"); in test_tc_links_before_target() 187 ASSERT_EQ(optq.prog_ids[1], pid2, "prog_ids[1]"); in test_tc_links_before_target() 244 ASSERT_EQ(optq.prog_ids[3], pid2, "prog_id in test_tc_links_before_target() 272 __u32 pid1, pid2, pid3, pid4; test_tc_links_after_target() local 426 __u32 pid1, pid2, lid1, lid2; test_tc_links_revision_target() local 527 __u32 pid1, pid2, pid3; test_tc_chain_classic() local 631 __u32 pid1, pid2, pid3, lid1, lid2; test_tc_links_replace_target() local 857 __u32 pid1, pid2, lid1; test_tc_links_invalid_target() local 1170 __u32 pid1, pid2, pid3, pid4; test_tc_links_prepend_target() local 1326 __u32 pid1, pid2, pid3, pid4; test_tc_links_append_target() local 1481 __u32 pid1, pid2, pid3, pid4; test_tc_links_dev_cleanup_target() local 1582 __u32 pid1, pid2, pid3; test_tc_chain_mixed() local 1693 __u32 pid1, pid2, pid3; test_tc_links_ingress() local 1795 __u32 pid1, pid2, pid3, pid4; test_tc_links_dev_mixed() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/math/ |
H A D | vmx_syscall.c | 51 pid_t pid2; in test_vmx_syscall() local 62 pid2 = fork(); in test_vmx_syscall() 64 /* Can't FAIL_IF(pid2 == -1); because we've already forked */ in test_vmx_syscall() 65 if (pid2 == -1) { in test_vmx_syscall() 71 if (pid2) in test_vmx_syscall() 72 waitpid(pid2, &child_ret, 0); in test_vmx_syscall()
|
H A D | fpu_syscall.c | 50 pid_t pid2; in test_syscall_fpu() local 56 pid2 = fork(); in test_syscall_fpu() 57 /* Can't FAIL_IF(pid2 == -1); because already forked once */ in test_syscall_fpu() 58 if (pid2 == -1) { in test_syscall_fpu() 65 if (pid2) in test_syscall_fpu() 66 waitpid(pid2, &child_ret, 0); in test_syscall_fpu()
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/math/ |
H A D | vmx_syscall.c | 51 pid_t pid2; in test_vmx_syscall() local 62 pid2 = fork(); in test_vmx_syscall() 64 /* Can't FAIL_IF(pid2 == -1); because we've already forked */ in test_vmx_syscall() 65 if (pid2 == -1) { in test_vmx_syscall() 71 if (pid2) in test_vmx_syscall() 72 waitpid(pid2, &child_ret, 0); in test_vmx_syscall()
|
H A D | fpu_syscall.c | 50 pid_t pid2; in test_syscall_fpu() local 56 pid2 = fork(); in test_syscall_fpu() 57 /* Can't FAIL_IF(pid2 == -1); because already forked once */ in test_syscall_fpu() 58 if (pid2 == -1) { in test_syscall_fpu() 65 if (pid2) in test_syscall_fpu() 66 waitpid(pid2, &child_ret, 0); in test_syscall_fpu()
|
/third_party/ltp/testcases/kernel/syscalls/fork/ |
H A D | fork03.c | 24 int pid1, pid2, status, i; in verify_fork() local 41 pid2 = SAFE_WAIT(&status); in verify_fork() 43 if (pid1 != pid2) { in verify_fork() 44 tst_res(TFAIL, "pids don't match: %d vs %d", pid1, pid2); in verify_fork()
|
H A D | fork02.c | 57 int pid1, pid2, status; in main() local 77 pid2 = wait(&status); in main() 80 if (pid1 == pid2) in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/pidfd/ |
H A D | pidfd_test.c | 199 pid_t pid2; in test_pidfd_send_signal_recycled_pid_fail() local 209 pid2 = fork(); in test_pidfd_send_signal_recycled_pid_fail() 210 if (pid2 < 0) in test_pidfd_send_signal_recycled_pid_fail() 213 if (pid2 == 0) in test_pidfd_send_signal_recycled_pid_fail() 216 if (pid2 == PID_RECYCLE) { in test_pidfd_send_signal_recycled_pid_fail() 217 snprintf(buf, sizeof(buf), "/proc/%d", pid2); in test_pidfd_send_signal_recycled_pid_fail() 218 ksft_print_msg("pid to recycle is %d\n", pid2); in test_pidfd_send_signal_recycled_pid_fail() 222 if (wait_for_pid(pid2)) in test_pidfd_send_signal_recycled_pid_fail() 225 if (pid2 >= PID_RECYCLE) in test_pidfd_send_signal_recycled_pid_fail() 233 if (pid2 ! in test_pidfd_send_signal_recycled_pid_fail() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/pidfd/ |
H A D | pidfd_test.c | 200 pid_t pid2; in test_pidfd_send_signal_recycled_pid_fail() local 210 pid2 = fork(); in test_pidfd_send_signal_recycled_pid_fail() 211 if (pid2 < 0) in test_pidfd_send_signal_recycled_pid_fail() 214 if (pid2 == 0) in test_pidfd_send_signal_recycled_pid_fail() 217 if (pid2 == PID_RECYCLE) { in test_pidfd_send_signal_recycled_pid_fail() 218 snprintf(buf, sizeof(buf), "/proc/%d", pid2); in test_pidfd_send_signal_recycled_pid_fail() 219 ksft_print_msg("pid to recycle is %d\n", pid2); in test_pidfd_send_signal_recycled_pid_fail() 223 if (wait_for_pid(pid2)) in test_pidfd_send_signal_recycled_pid_fail() 226 if (pid2 >= PID_RECYCLE) in test_pidfd_send_signal_recycled_pid_fail() 234 if (pid2 ! in test_pidfd_send_signal_recycled_pid_fail() [all...] |
/third_party/ltp/testcases/kernel/syscalls/kill/ |
H A D | kill08.c | 77 pid_t pid1, pid2; in main() local 104 pid2 = FORK_OR_VFORK(); in main() 105 if (pid2 < 0) { in main() 107 } else if (pid2 == 0) { in main()
|
/third_party/ltp/testcases/kernel/controllers/memcg/regression/ |
H A D | memcg_regression_test.sh | 156 pid2=$! 163 wait $pid2 166 kill -9 $pid1 $pid2 > /dev/null 2>&1 167 wait $pid1 $pid2 181 kill -9 $pid1 $pid2 > /dev/null 2>&1 182 wait $pid1 $pid2 > /dev/null 2>&1
|
/third_party/ltp/testcases/kernel/controllers/cgroup/ |
H A D | cgroup_regression_test.sh | 173 pid2=$! 176 kill -USR1 $pid1 $pid2 178 wait $pid2 2>/dev/null 232 local pid2=$! 235 kill -USR1 $pid1 $pid2 237 wait $pid2 2>/dev/null 259 local pid2=$! 262 kill -USR1 $pid1 $pid2 264 wait $pid2 2>/dev/null
|
/third_party/musl/libc-test/src/functionalext/unittest/ |
H A D | unit_test_assert_fail_dialog.c | 112 pid_t pid1, pid2, pid3; in main() local 128 pid2 = fork(); in main() 129 if (pid2 < 0) { in main() 133 } else if (pid2 == 0) { in main() 153 waitpid(pid2, &status, 0); in main()
|
/third_party/ltp/testcases/kernel/fs/fs_inod/ |
H A D | fs_inod | 188 pid2=$! 192 wait $pid2 194 pid2=$! 198 wait $pid2
|
/third_party/elfutils/tests/ |
H A D | backtrace.c | 321 prepare_thread (pid_t pid2 __attribute__ ((unused)), in prepare_thread() 330 l = ptrace (PTRACE_GETREGS, pid2, 0, (intptr_t) &user_regs); in prepare_thread() 333 l = ptrace (PTRACE_SETREGS, pid2, 0, (intptr_t) &user_regs); in prepare_thread() 335 l = ptrace (PTRACE_CONT, pid2, NULL, (void *) (intptr_t) SIGUSR2); in prepare_thread() 337 pid_t got = waitpid (pid2, &status, __WALL); in prepare_thread() 338 assert (got == pid2); in prepare_thread() 412 pid_t pid2 = waitpid (-1, &status, __WALL); in exec_dump() local 413 assert (pid2 > 0); in exec_dump() 414 assert (pid2 != pid); in exec_dump() 470 prepare_thread (pid2, jm in exec_dump() [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/thread/ |
H A D | pthread_cond_timedwait_sup.c | 56 pthread_t pid1, pid2; in pthread_cond_timedwait_0100() local 58 pthread_create(&pid2, NULL, threadfuncB, NULL); in pthread_cond_timedwait_0100() 60 pthread_join(pid2, NULL); in pthread_cond_timedwait_0100()
|
/test/xts/acts/kernel_lite/process_posix/src/ |
H A D | PidTest.cpp | 78 pid_t pid2 = fork();
in HWTEST_F() local 79 if (pid2 < 0) {
in HWTEST_F() 84 if (pid2 == 0) { // child
in HWTEST_F() 211 pid_t pid2 = fork();
in HWTEST_F() local 212 ASSERT_TRUE(pid2 >= 0) << "======== Fork Error! =========";
in HWTEST_F() 213 if (pid2 == 0) { // child2
in HWTEST_F() 234 WaitProcExitedOK(pid2);
in HWTEST_F()
|
/kernel/liteos_a/testsuites/unittest/container/full/ |
H A D | It_pid_container_018.cpp | 89 pid_t pid2 = fork(); in ChildFun() local 90 if (pid2 == 0) { in ChildFun() 110 ret = waitpid(pid2, NULL, 0); in ChildFun() 111 if (ret != pid2) { in ChildFun()
|
/kernel/liteos_a/testsuites/unittest/process/basic/process/smoke/ |
H A D | process_test_023.cpp | 75 pid_t pid, pid1, pid2; in ProcessTest() local 98 pid2 = fork(); in ProcessTest() 99 ICUNIT_GOTO_WITHIN_EQUAL(pid2, 0, 100000, pid, EXIT); // 100000, assert pid2 equal to this. in ProcessTest() 100 if (pid2 == 0) { in ProcessTest()
|