/kernel/linux/linux-5.10/tools/testing/selftests/nsfs/ |
H A D | pidns.c | 43 char *ns_strs[] = {"pid", "user"}; in main() 44 char path[] = "/proc/0123456789/ns/pid"; in main() 48 pid_t pid; in main() local 50 pid = clone(child, ca.stack_ptr, CLONE_NEWUSER | CLONE_NEWPID | SIGCHLD, NULL); in main() 51 if (pid < 0) in main() 55 snprintf(path, sizeof(path), "/proc/%d/ns/%s", pid, ns_strs[i]); in main() 76 kill(pid, SIGKILL); in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | test_bpffs.c | 82 pid_t pid; in test_test_bpffs() local 84 pid = fork(); in test_test_bpffs() 85 if (CHECK(pid == -1, "clone", "clone failed %d", errno)) in test_test_bpffs() 87 if (pid == 0) in test_test_bpffs() 89 err = waitpid(pid, &status, 0); in test_test_bpffs()
|
/kernel/linux/linux-5.10/tools/testing/selftests/cgroup/ |
H A D | cgroup_util.h | 38 extern int cg_enter(const char *cgroup, int pid); 48 extern int set_oom_adj_score(int pid, int score); 51 extern ssize_t proc_read_text(int pid, bool thread, const char *item, char *buf, size_t size); 52 extern int proc_read_strstr(int pid, bool thread, const char *item, const char *needle); 54 extern int clone_reap(pid_t pid, int options);
|
/kernel/linux/linux-5.10/tools/perf/scripts/python/ |
H A D | failed-syscalls-by-pid.py | 1 # failed system call counts, by pid 5 # Displays system-wide failed system call totals, broken down by pid. 20 usage = "perf script -s syscall-counts-by-pid.py [comm|pid]\n"; 66 print("%-30s %10s" % ("comm [pid]", "count")) 72 for pid in pid_keys: 73 print("\n%s [%d]" % (comm, pid)) 74 id_keys = syscalls[comm][pid].keys() 77 ret_keys = syscalls[comm][pid][id].keys() 78 for ret, val in sorted(syscalls[comm][pid][i [all...] |
/kernel/linux/linux-6.6/tools/perf/scripts/python/ |
H A D | failed-syscalls-by-pid.py | 1 # failed system call counts, by pid 5 # Displays system-wide failed system call totals, broken down by pid. 20 usage = "perf script -s syscall-counts-by-pid.py [comm|pid]\n"; 66 print("%-30s %10s" % ("comm [pid]", "count")) 72 for pid in pid_keys: 73 print("\n%s [%d]" % (comm, pid)) 74 id_keys = syscalls[comm][pid].keys() 77 ret_keys = syscalls[comm][pid][id].keys() 78 for ret, val in sorted(syscalls[comm][pid][i [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/nsfs/ |
H A D | pidns.c | 43 char *ns_strs[] = {"pid", "user"}; in main() 44 char path[] = "/proc/0123456789/ns/pid"; in main() 48 pid_t pid; in main() local 50 pid = clone(child, ca.stack_ptr, CLONE_NEWUSER | CLONE_NEWPID | SIGCHLD, NULL); in main() 51 if (pid < 0) in main() 55 snprintf(path, sizeof(path), "/proc/%d/ns/%s", pid, ns_strs[i]); in main() 76 kill(pid, SIGKILL); in main()
|
/kernel/linux/linux-6.6/tools/testing/selftests/cgroup/ |
H A D | cgroup_util.h | 44 extern int cg_enter(const char *cgroup, int pid); 54 extern int set_oom_adj_score(int pid, int score); 58 extern ssize_t proc_read_text(int pid, bool thread, const char *item, char *buf, size_t size); 59 extern int proc_read_strstr(int pid, bool thread, const char *item, const char *needle); 61 extern int clone_reap(pid_t pid, int options);
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/mm/ |
H A D | stack_expansion_signal.c | 75 pid_t pid; in test_one_size() local 80 pid = fork(); in test_one_size() 81 if (pid == 0) { in test_one_size() 91 kill(pid, SIGUSR1); in test_one_size() 93 FAIL_IF(wait_for_child(pid)); in test_one_size()
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/pmu/ebb/ |
H A D | cpu_event_pinned_vs_ebb_test.c | 44 pid_t pid; in cpu_event_pinned_vs_ebb() local 54 pid = fork(); in cpu_event_pinned_vs_ebb() 55 if (pid == 0) { in cpu_event_pinned_vs_ebb() 63 kill_child_and_wait(pid); in cpu_event_pinned_vs_ebb() 77 FAIL_IF(wait_for_child(pid) != 2); in cpu_event_pinned_vs_ebb()
|
/kernel/liteos_a/testsuites/kernel/sample/kernel_extend/cpup/smoke/ |
H A D | It_extend_cpup_002.c | 80 INT32 pid; in Testcase() local 84 pid = LOS_Fork(0, "TestCpupTsk", TaskF01, LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE); in Testcase() 85 if (pid < 0) { in Testcase() 105 ret = LOS_Wait(pid, NULL, 0, NULL); in Testcase() 106 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
|
/kernel/liteos_a/testsuites/unittest/extended/signal/full/ |
H A D | signal_test_040.cpp | 45 int pid = 0; in TestCase() local 63 pid = fork(); in TestCase() 64 if (pid == 0) { in TestCase() 82 kill(pid, SIGHUP); in TestCase() 84 kill(pid, SIGUSR1); in TestCase()
|
/kernel/liteos_a/testsuites/unittest/extended/signal/smoke/ |
H A D | It_ipc_pipe_004.cpp | 46 pid_t pid = fork(); in TestCase() local 47 if (pid == -1) { in TestCase() 50 } else if (pid == 0) { in TestCase() 73 ret = waitpid(pid, &status, 0); in TestCase() 74 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestCase()
|
/kernel/liteos_a/testsuites/unittest/libc/io/full/ |
H A D | IO_test_pselect_002.cpp | 50 pid_t pid; in testcase() local 86 pid = fork(); in testcase() 87 if (pid == 0) { in testcase() 103 retval = kill(pid, SIGALRM); in testcase() 106 retval = kill(pid, SIGUSR1); in testcase()
|
/kernel/liteos_a/testsuites/unittest/process/basic/pthread/smoke/ |
H A D | pthread_test_020.cpp | 84 int ret, pid, status; in TestCase() local 86 pid = fork(); in TestCase() 87 if (pid == 0) { in TestCase() 93 } else if (pid > 0) { in TestCase() 94 waitpid(pid, &status, 0); in TestCase()
|
H A D | pthread_test_026.cpp | 85 int ret, pid, status; in TestCase() local 87 pid = fork(); in TestCase() 88 if (pid == 0) { in TestCase() 94 } else if (pid > 0) { in TestCase() 95 waitpid(pid, &status, 0); in TestCase()
|
/test/xts/hats/kernel/syscalls/ns/setns/ |
H A D | SetnsApiTest.cpp | 67 pid_t pid = getpid(); in HWTEST_F() local 70 int ret = sprintf_s(path, PATH_MAX_SIZE - 1, "/proc/%d/ns/ipc", pid); in HWTEST_F() 81 ret = sprintf_s(path, PATH_MAX_SIZE - 1, "/proc/%d/ns/net", pid); in HWTEST_F() 92 ret = sprintf_s(path, PATH_MAX_SIZE - 1, "/proc/%d/ns/pid", pid); in HWTEST_F() 103 ret = sprintf_s(path, PATH_MAX_SIZE - 1, "/proc/%d/ns/uts", pid); in HWTEST_F()
|
/third_party/libuv/test/ |
H A D | test-pipe-close-stdout-read-stdin.c | 57 int pid; in TEST_IMPL() local 67 pid = -1; in TEST_IMPL() 69 pid = fork(); in TEST_IMPL() 72 if (pid == 0) { in TEST_IMPL() 110 waitpid(pid, &status, 0); in TEST_IMPL()
|
/third_party/ltp/testcases/kernel/controllers/cgroup/ |
H A D | cgroup_core02.c | 55 pid_t pid; in test_lesser_ns_open() local 66 pid = ltp_clone(CLONE_NEWCGROUP | CLONE_FILES | CLONE_VM | SIGCHLD, in test_lesser_ns_open() 68 if (pid < 0) { in test_lesser_ns_open() 69 tst_res(TFAIL, "unexpected negative pid %d", pid); in test_lesser_ns_open() 73 SAFE_WAITPID(pid, &status, 0); in test_lesser_ns_open()
|
/third_party/musl/libc-test/src/regression/ |
H A D | pthread_exit-dtor.c | 43 int r, arg=0, pid; in main() local 48 pid = fork(); in main() 49 switch (pid) { in main() 57 if (waitpid(pid, &r, 0) != pid) { in main()
|
/third_party/libinput/test/ |
H A D | test_quirks_files.py | 64 pid = section.get("MatchProduct") 65 if pid is not None: 67 "0x[0-9A-F]{4}", pid 68 ), f"{quirksfile}: {name}: {pid} must be uppercase hex (0xAB12)" 80 pid = int(section.get("MatchProduct", "0x0"), 16) 82 pid not in logitech_receivers
|
/third_party/ltp/testcases/kernel/ipc/semaphore/ |
H A D | sem01.c | 109 pid_t pid; in main() local 137 if ((pid = fork()) < 0) { in main() 141 if (pid) { in main() 143 srand(pid); in main() 145 waitpid(pid, &chstat, 0); in main()
|
/third_party/ltp/testcases/lib/ |
H A D | tst_ns_ifmove.c | 58 int intf_index, pid, rtnetlink_socket; in main() local 66 pid = atoi(argv[2]); in main() 81 RTA_LENGTH(sizeof(pid)); in main() 82 memcpy(RTA_DATA(rta), &pid, sizeof(pid)); in main() local
|
/third_party/ltp/testcases/kernel/syscalls/pipe2/ |
H A D | pipe2_04.c | 25 pid_t pid; in test_pipe2() local 43 pid = SAFE_FORK(); in test_pipe2() 44 if (!pid) { in test_pipe2() 49 if (TST_PROCESS_STATE_WAIT(pid, 'S', 1000) < 0) in test_pipe2() 54 SAFE_KILL(pid, SIGKILL); in test_pipe2()
|
/third_party/ltp/testcases/kernel/syscalls/setpriority/ |
H A D | setpriority01.c | 22 static int pid, uid, user_added; variable 28 {PRIO_PROCESS, &pid}, 29 {PRIO_PGRP, &pid}, 89 pid = SAFE_FORK(); in verify_setpriority() 90 if (pid == 0) { in verify_setpriority()
|
/third_party/ltp/testcases/kernel/syscalls/ipc/msgsnd/ |
H A D | msgsnd05.c | 58 pid_t pid; in do_test() local 66 pid = SAFE_FORK(); in do_test() 67 if (!pid) { in do_test() 73 TST_PROCESS_STATE_WAIT(pid, 'S', 0); in do_test() 74 SAFE_KILL(pid, SIGHUP); in do_test()
|