/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_ringbuf.c | 10 int pid; member 22 int pid = 0; variable 46 if (cur_pid != pid) in test_ringbuf() 55 sample->pid = pid; in test_ringbuf()
|
H A D | test_ringbuf_multi.c | 10 int pid; member 35 int pid = 0; variable 52 if (cur_pid != pid) in test_ringbuf() 67 sample->pid = pid; in test_ringbuf()
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/pmu/ebb/ |
H A D | ebb_on_willing_child_test.c | 53 pid_t pid; in ebb_on_willing_child() local 60 pid = fork(); in ebb_on_willing_child() 61 if (pid == 0) { in ebb_on_willing_child() 78 FAIL_IF(event_open_with_pid(&event, pid)); in ebb_on_willing_child() 82 FAIL_IF(wait_for_child(pid)); in ebb_on_willing_child()
|
H A D | ebb_vs_cpu_event_test.c | 42 pid_t pid; in ebb_vs_cpu_event() local 52 pid = fork(); in ebb_vs_cpu_event() 53 if (pid == 0) { in ebb_vs_cpu_event() 64 kill_child_and_wait(pid); in ebb_vs_cpu_event() 72 FAIL_IF(wait_for_child(pid)); in ebb_vs_cpu_event()
|
H A D | ebb_on_child_test.c | 48 pid_t pid; in ebb_on_child() local 55 pid = fork(); in ebb_on_child() 56 if (pid == 0) { in ebb_on_child() 72 FAIL_IF(event_open_with_pid(&event, pid)); in ebb_on_child() 78 FAIL_IF(wait_for_child(pid)); in ebb_on_child()
|
H A D | cpu_event_vs_ebb_test.c | 42 pid_t pid; in cpu_event_vs_ebb() local 52 pid = fork(); in cpu_event_vs_ebb() 53 if (pid == 0) { in cpu_event_vs_ebb() 61 kill_child_and_wait(pid); in cpu_event_vs_ebb() 75 FAIL_IF(wait_for_child(pid)); in cpu_event_vs_ebb()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_ringbuf.c | 11 int pid; member 22 int pid = 0; variable 45 if (cur_pid != pid) in test_ringbuf() 54 sample->pid = pid; in test_ringbuf()
|
H A D | test_ringbuf_multi.c | 10 int pid; member 47 int pid = 0; variable 63 if (cur_pid != pid) in test_ringbuf() 78 sample->pid = pid; in test_ringbuf()
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/dscr/ |
H A D | dscr_inherit_exec_test.c | 45 pid_t pid; in dscr_inherit_exec() local 62 pid = fork(); in dscr_inherit_exec() 63 if (pid == -1) { in dscr_inherit_exec() 66 } else if (pid) { in dscr_inherit_exec() 69 if (waitpid(pid, &status, 0) == -1) { in dscr_inherit_exec()
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/math/ |
H A D | fpu_syscall.c | 18 extern int test_fpu(double *darray, pid_t *pid); 51 pid_t pid = fork(); in test_syscall_fpu() local 54 FAIL_IF(pid == -1); in test_syscall_fpu() 73 if (pid) in test_syscall_fpu() 74 waitpid(pid, &child_ret, 0); in test_syscall_fpu()
|
/kernel/linux/linux-6.6/samples/trace_events/ |
H A D | trace_custom_sched.h | 50 __entry->next_pid = next->pid; 66 __field( pid_t, pid ) 71 __entry->pid = p->pid; 75 TP_printk("pid=%d prio=%d", __entry->pid, __entry->prio)
|
/kernel/liteos_a/testsuites/unittest/process/basic/pthread/smoke/ |
H A D | pthread_test_023.cpp | 80 int ret, pid, status; in TestCase() local 82 pid = fork(); in TestCase() 83 if (pid == 0) { in TestCase() 89 } else if (pid > 0) { in TestCase() 90 waitpid(pid, &status, 0); in TestCase()
|
H A D | pthread_test_025.cpp | 76 int ret, pid, status; in TestCase() local 78 pid = fork(); in TestCase() 79 if (pid == 0) { in TestCase() 85 } else if (pid > 0) { in TestCase() 86 waitpid(pid, &status, 0); in TestCase()
|
H A D | pthread_test_024.cpp | 69 int ret, pid, status; in TestCase() local 71 pid = fork(); in TestCase() 72 if (pid == 0) { in TestCase() 78 } else if (pid > 0) { in TestCase() 79 waitpid(pid, &status, 0); in TestCase()
|
H A D | pthread_test_027.cpp | 70 int ret, pid, status; in TestCase() local 72 pid = fork(); in TestCase() 73 if (pid == 0) { in TestCase() 79 } else if (pid > 0) { in TestCase() 80 waitpid(pid, &status, 0); in TestCase()
|
/third_party/ltp/testcases/kernel/controllers/cgroup_fj/ |
H A D | cgroup_fj_common.sh | 18 local pid="$1" 23 tst_res TINFO "Attaching task $pid to $path" 25 ROD echo "$pid" \> "$path/$task_list" 28 if [ "$task" -ne "$pid" ]; then 29 tst_res TINFO "Unexpected pid $task in $path/$task_list, expected $pid"
|
/third_party/ltp/testcases/kernel/syscalls/capget/ |
H A D | capget02.c | 13 * 4) capget() fails with errno set to EINVAL if header->pid < 0 15 * pid, header->pid does not exist. 29 int pid; member 37 {0x20080522, -1, EINVAL, 0, "bad pid"}, 38 {0x20080522, 1, ESRCH, 0, "unused pid"}, 46 if (tc->pid == 1) in verify_capget() 47 header->pid = unused_pid; in verify_capget() 49 header->pid = tc->pid; in verify_capget() [all...] |
/third_party/ltp/testcases/kernel/syscalls/flock/ |
H A D | flock04.c | 49 pid_t pid; in verify_flock() local 63 pid = SAFE_FORK(); in verify_flock() 64 if (pid == 0) in verify_flock() 69 pid = SAFE_FORK(); in verify_flock() 70 if (pid == 0) in verify_flock()
|
/third_party/ltp/testcases/kernel/syscalls/vmsplice/ |
H A D | vmsplice04.c | 27 int pid; in vmsplice_test() local 42 pid = SAFE_FORK(); in vmsplice_test() 43 if (!pid) { in vmsplice_test() 53 if (TST_PROCESS_STATE_WAIT(pid, 'S', 1000) < 0) in vmsplice_test() 58 SAFE_KILL(pid, SIGKILL); in vmsplice_test()
|
/third_party/ltp/testcases/kernel/syscalls/clone3/ |
H A D | clone303.c | 40 pid_t pid; in run() local 42 pid = clone_into_cgroup(fd); in run() 44 if (!pid) { in run() 53 if (atoi(buf) == pid) in run() 60 SAFE_WAITPID(pid, NULL, 0); in run()
|
/third_party/ltp/testcases/kernel/syscalls/waitpid/ |
H A D | waitpid04.c | 62 int pid, status, ret; in main() local 75 ret = waitpid(pid, &status, WNOHANG); in main() 96 pid = 1; in main() 97 ret = waitpid(pid, &status, WUNTRACED); in main() 115 ret = waitpid(pid, &status, INVAL_FLAG); in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/ |
H A D | 17-5.c | 42 pid_t pid = getpid(); in main() local 48 rc = sched_getparam(pid, ¶m); in main() 54 rc = sched_getscheduler(pid); in main() 65 rc = sched_getparam(pid, ¶m); in main() 70 rc = sched_getscheduler(pid); in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/ |
H A D | 3-2.c | 26 int pid, slepts; in main() local 34 if ((pid = fork()) < 0) { in main() 37 } else if (pid == 0) { in main() 57 if (kill(pid, SIGSTOP) != 0) { in main() 62 if (kill(pid, SIGCONT) != 0) { in main()
|
/third_party/musl/libc-test/src/gwp_asan/ |
H A D | gwp_asan_smoke_test.c | 91 pid_t pid = fork();
in main() local 92 if (pid < 0) {
in main() 94 } else if (pid == 0) { // child process
in main() 98 if (waitpid(pid, &status, 0) != pid) {
in main()
|
/third_party/toybox/toys/other/ |
H A D | oneit.c | 66 int i, pid, pipes[] = {SIGUSR1, SIGUSR2, SIGTERM, SIGINT}; in oneit_main() local 83 pid = XVFORK(); in oneit_main() 84 if (pid) { in oneit_main() 86 // pid 1 reaps zombies until it gets its child, then halts system. in oneit_main() 90 while (pid != wait(&i)) if (FLAG(3)) i = write(4, &pid, 4); in oneit_main()
|