/base/sensors/medical_sensor/services/medical_sensor/test/unittest/common/ |
H A D | client_info_test.cpp | 63 int32_t pid = 1000; in HWTEST_F() local 70 bool ret = clientInfo_.UpdateSensorInfo(ACC_SENSOR_ID, pid, sensorInfo); in HWTEST_F() 83 int32_t pid = 1067; in HWTEST_F() local 90 bool ret = clientInfo_.UpdateSensorInfo(ACC_SENSOR_ID, pid, sensorInfo); in HWTEST_F() 103 int32_t pid = 1000; in HWTEST_F() local 110 bool ret = clientInfo_.UpdateSensorInfo(MAG_SENSOR_ID, pid, sensorInfo); in HWTEST_F() 123 int32_t pid = 1000; in HWTEST_F() local 130 bool ret = clientInfo_.UpdateSensorInfo(INVALID_SENSOR_ID, pid, sensorInfo); in HWTEST_F() 143 int32_t pid = -1; in HWTEST_F() local 150 bool ret = clientInfo_.UpdateSensorInfo(MAG_SENSOR_ID, pid, sensorInf in HWTEST_F() 163 int32_t pid = 1067; HWTEST_F() local 209 int32_t pid = 1067; HWTEST_F() local 225 int32_t pid = -1; HWTEST_F() local 241 int32_t pid = 1000; HWTEST_F() local 256 int32_t pid = -1; HWTEST_F() local 271 int32_t pid = 1000; HWTEST_F() local 339 int32_t pid = 1067; HWTEST_F() local [all...] |
/base/hiviewdfx/faultloggerd/test/funchook/ |
H A D | dfx_func_hook_unittest.cpp | 54 pid_t pid = fork(); in HWTEST_F() local 55 bool isSuccess = pid >= 0; in HWTEST_F() 60 if (pid == 0) { in HWTEST_F() 64 int ret = waitpid(pid, &status, 0); in HWTEST_F() 65 printf("child ret with pid:%d status:%d\n", ret, status); in HWTEST_F() 83 pid_t pid = fork(); in HWTEST_F() local 84 bool isSuccess = pid >= 0; in HWTEST_F() 89 if (pid == 0) { in HWTEST_F() 94 printf("child pid:%d\n", pid); in HWTEST_F() [all...] |
/kernel/liteos_a/testsuites/unittest/process/basic/process/full/ |
H A D | process_test_032.cpp | 60 pid_t pid, pid1; in TestCase() local 62 pid = fork(); in TestCase() 63 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, assert pid equal to this. in TestCase() 65 if (pid == 0) { in TestCase() 72 ret = setpgid(pid, pid); in TestCase() 80 Child2(currGid, pid); in TestCase() 86 ret = waitpid(pid, in TestCase() [all...] |
H A D | process_test_034.cpp | 58 pid_t pid, pid1; in TestCase() local 60 pid = fork(); in TestCase() 61 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, assert pid equal to this. in TestCase() 63 if (pid == 0) { in TestCase() 70 ICUNIT_GOTO_NOT_EQUAL(pid1, pid, pid1, EXIT); in TestCase() 73 Child2(currGid, pid); in TestCase() 79 ret = setpgid(pid1, pid); in TestCase() 83 ret = waitpid(pid, in TestCase() [all...] |
H A D | process_test_051.cpp | 39 pid_t pid; in TestThread() local 48 pid = fork(); in TestThread() 50 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, assert pid equal to this. in TestThread() 51 if (pid == 0) { in TestThread() 56 ret = waitpid(pid, NULL, 0); in TestThread() 57 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestThread() 69 pid_t pid; in Testcase() local 89 pid in Testcase() [all...] |
H A D | process_test_049.cpp | 56 pid_t pid = fork(); in TestThread() local 58 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, assert pid equal to this. in TestThread() 59 if (pid == 0) { in TestThread() 66 ret = waitpid(pid, NULL, 0); in TestThread() 67 printf("waitpid ret : %d errno : %d pid : %d getpid : %d\n", ret, errno, pid, getpid()); in TestThread() 69 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestThread() 84 pid_t pid; in Testcase() local [all...] |
/third_party/node/test/parallel/ |
H A D | test-process-kill-pid.js | 26 // Test variants of pid 33 // String(process.pid): TypeError 39 // process.pid, String(process.pid): ourself 45 message: 'The "pid" argument must be of type number.' + 73 process._kill = function(pid, sig) { 74 getPid = pid; 106 kill(process.pid, 'SIGHUP', process.pid, 1); 107 kill(process.pid, undefine [all...] |
/base/tee/tee_client/services/cadaemon/src/ca_daemon/ |
H A D | cadaemon_service.cpp | 130 static DaemonProcdata *GetProcdataByPid(int pid) in GetProcdataByPid() argument 140 if (tmp->callingPid == pid) { in GetProcdataByPid() 222 static TEEC_Result AddTidData(TidData **tidData, int pid) in AddTidData() argument 231 (*tidData)->callingPid = pid; in AddTidData() 247 static void SendSigToTzdriver(int pid) in SendSigToTzdriver() argument 263 if (tmp->callingPid == pid) { in SendSigToTzdriver() 272 bool CaDaemonService::IsValidContextWithoutLock(const TEEC_Context *context, int pid) in IsValidContextWithoutLock() argument 275 DaemonProcdata *outProcData = GetProcdataByPid(pid); in IsValidContextWithoutLock() 294 bool CaDaemonService::IsValidContext(const TEEC_Context *context, int pid) in IsValidContext() argument 297 return IsValidContextWithoutLock(context, pid); in IsValidContext() 300 CallGetProcDataPtr(int pid) CallGetProcDataPtr() argument 328 SetContextToProcData(int32_t pid, TEEC_ContextInner *outContext) SetContextToProcData() argument 351 PutBnContextAndReleaseFd(int32_t pid, TEEC_ContextInner *outContext) PutBnContextAndReleaseFd() argument 409 ReleaseContext(int32_t pid, TEEC_ContextInner **contextInner) ReleaseContext() argument 484 pid_t pid = IPCSkeleton::GetCallingPid(); FinalizeContext() local 498 CallFinalizeContext(int32_t pid, const TEEC_Context *contextPtr) CallFinalizeContext() argument 512 CallGetBnContext(const TEEC_Context *inContext, int pid, TEEC_Session **outSession, TEEC_ContextInner **outContext) CallGetBnContext() argument 799 pid_t pid = IPCSkeleton::GetCallingPid(); OpenSession() local 856 CallGetBnSession(int pid, const TEEC_Context *inContext, const TEEC_Session *inSession, TEEC_ContextInner **outContext, TEEC_Session **outSession) CallGetBnSession() argument 897 pid_t pid = IPCSkeleton::GetCallingPid(); InvokeCommand() local 941 pid_t pid = IPCSkeleton::GetCallingPid(); CloseSession() local 978 pid_t pid = IPCSkeleton::GetCallingPid(); RegisterSharedMemory() local 1064 pid_t pid = IPCSkeleton::GetCallingPid(); AllocateSharedMemory() local 1120 pid_t pid = IPCSkeleton::GetCallingPid(); ReleaseSharedMemory() local 1168 pid_t pid = IPCSkeleton::GetCallingPid(); SetCallBack() local 1178 AddClient(pid_t pid, const sptr<IRemoteObject> ¬ify) AddClient() argument 1255 ProcessCaDied(int32_t pid) ProcessCaDied() argument [all...] |
/kernel/linux/linux-5.10/tools/perf/scripts/python/ |
H A D | netdev-times.py | 142 event['pid'], event['comm'])) 232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): 235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 238 def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): 241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 244 def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): 247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 250 def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 256 def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, com [all...] |
/kernel/linux/linux-6.6/tools/perf/scripts/python/ |
H A D | netdev-times.py | 142 event['pid'], event['comm'])) 232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): 235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 238 def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): 241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 244 def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): 247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 250 def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 256 def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, com [all...] |
/third_party/ltp/testcases/kernel/syscalls/getpid/ |
H A D | getpid01.c | 17 pid_t pid_max, pid; in verify_getpid() local 23 pid = SAFE_FORK(); in verify_getpid() 24 if (pid == 0) { in verify_getpid() 25 pid = getpid(); in verify_getpid() 27 /* pid should not be 1 or out of maximum */ in verify_getpid() 28 if (1 < pid && pid <= pid_max) in verify_getpid() 29 tst_res(TPASS, "getpid() returns %d", pid); in verify_getpid() 32 "getpid() returns out of range: %d", pid); in verify_getpid()
|
/base/hiviewdfx/hiview/framework/native/unified_collection/process/include/ |
H A D | process_status.h | 42 std::string GetProcessName(int32_t pid);
43 ProcessState GetProcessState(int32_t pid);
44 uint64_t GetProcessLastForegroundTime(int32_t pid);
45 void NotifyProcessState(int32_t pid, ProcessState procState);
48 bool UpdateProcessName(int32_t pid, const std::string& procName);
49 void UpdateProcessState(int32_t pid, ProcessState procState);
50 void UpdateProcessForegroundState(int32_t pid);
51 void UpdateProcessBackgroundState(int32_t pid);
54 void ClearProcessInfo(int32_t pid);
58 /* map<pid, ProcessInf [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/proc/ |
H A D | proc-loadavg-001.c | 16 /* Test that /proc/loadavg correctly reports last pid in pid namespace. */ 27 pid_t pid; in main() local 36 pid = fork(); in main() 37 if (pid == -1) in main() 39 if (pid == 0) { in main() 52 /* pid 1 */ in main() 56 pid = fork(); in main() 57 if (pid == -1) in main() 59 if (pid in main() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/proc/ |
H A D | proc-loadavg-001.c | 16 /* Test that /proc/loadavg correctly reports last pid in pid namespace. */ 27 pid_t pid; in main() local 36 pid = fork(); in main() 37 if (pid == -1) in main() 39 if (pid == 0) { in main() 52 /* pid 1 */ in main() 56 pid = fork(); in main() 57 if (pid == -1) in main() 59 if (pid in main() [all...] |
/third_party/ltp/testcases/kernel/containers/sysvipc/ |
H A D | common.h | 46 int pid; in clone_test() local 48 pid = SAFE_CLONE(&clone_args); in clone_test() 49 if (!pid) { in clone_test() 57 int pid; in unshare_test() local 59 pid = SAFE_FORK(); in unshare_test() 60 if (!pid) { in unshare_test() 70 int pid; in plain_test() local 72 pid = SAFE_FORK(); in plain_test() 73 if (!pid) { in plain_test()
|
/kernel/linux/linux-6.6/tools/bpf/runqslower/ |
H A D | runqslower.bpf.c | 30 u32 pid = t->pid; in trace_enqueue() local 33 if (!pid || (targ_pid && targ_pid != pid)) in trace_enqueue() 74 u32 pid; in handle__sched_switch() local 80 pid = next->pid; in handle__sched_switch() 82 /* For pid mismatch, save a bpf_task_storage_get */ in handle__sched_switch() 83 if (!pid || (targ_pid && targ_pid != pid)) in handle__sched_switch() [all...] |
/kernel/liteos_a/testsuites/unittest/container/smoke/ |
H A D | It_time_container_004.cpp | 54 static int WriteProcTime(int pid) in WriteProcTime() argument 64 ret = sprintf_s(path, STR_LEN, "/proc/%d/time_offsets", pid); in WriteProcTime() 103 auto pid = clone(childFunc, stackTop, CLONE_NEWTIME | SIGCHLD, &tp); in TimeContainerUnshare() local 104 ASSERT_TRUE(pid != -1); in TimeContainerUnshare() 106 ret = waitpid(pid, &status, 0); in TimeContainerUnshare() 107 ASSERT_EQ(ret, pid); in TimeContainerUnshare() 121 auto pid = fork(); in ItTimeContainer004() local 122 ASSERT_TRUE(pid != -1); in ItTimeContainer004() 123 if (pid == 0) { in ItTimeContainer004() 127 auto ret = waitpid(pid, in ItTimeContainer004() [all...] |
H A D | It_time_container_005.cpp | 54 static int WriteProcTime(int pid) in WriteProcTime() argument 64 ret = sprintf_s(path, STR_LEN, "/proc/%d/time_offsets", pid); in WriteProcTime() 103 auto pid = clone(childFunc, stackTop, CLONE_NEWTIME | SIGCHLD, &tp); in TimeContainerUnshare() local 104 ASSERT_TRUE(pid != -1); in TimeContainerUnshare() 106 ret = waitpid(pid, &status, 0); in TimeContainerUnshare() 107 ASSERT_EQ(ret, pid); in TimeContainerUnshare() 121 auto pid = fork(); in ItTimeContainer005() local 122 ASSERT_TRUE(pid != -1); in ItTimeContainer005() 123 if (pid == 0) { in ItTimeContainer005() 127 auto ret = waitpid(pid, in ItTimeContainer005() [all...] |
/third_party/ltp/testcases/kernel/containers/pidns/ |
H A D | pidns05.c | 54 int pid; in find_cinit_pids() local 61 for (pid = 2; pid < pid_max; pid++) { in find_cinit_pids() 62 if (pid == parentpid) in find_cinit_pids() 65 pgid2 = getpgid(pid); in find_cinit_pids() 68 pids[next] = pid; in find_cinit_pids() 87 pid_t pid; in run() local 89 pid = SAFE_CLONE(&clone_args); in run() 90 if (!pid) { in run() [all...] |
/kernel/linux/linux-5.10/drivers/net/wan/ |
H A D | hdlc_ppp.c | 66 u16 pid; /* protocol ID */ member 109 static inline struct proto* get_proto(struct net_device *dev, u16 pid) in get_proto() argument 113 switch (pid) { in get_proto() 125 static inline const char* proto_name(u16 pid) in proto_name() argument 127 switch (pid) { in proto_name() 204 static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, in ppp_tx_cp() argument 217 if (pid == PID_LCP && (code == LCP_ECHO_REQ || code == LCP_ECHO_REPLY)) in ppp_tx_cp() 247 proto_name(pid), code_names[code], id, debug_buffer); in ppp_tx_cp() 250 ppp_hard_header(skb, dev, pid, NULL, NULL, 0); in ppp_tx_cp() 302 static void ppp_cp_event(struct net_device *dev, u16 pid, u1 argument 373 ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id, unsigned int req_len, const u8 *data) ppp_cp_parse_cr() argument 445 u16 pid; ppp_rx() local [all...] |
/kernel/linux/linux-6.6/drivers/net/wan/ |
H A D | hdlc_ppp.c | 66 u16 pid; /* protocol ID */ member 110 static inline struct proto *get_proto(struct net_device *dev, u16 pid) in get_proto() argument 114 switch (pid) { in get_proto() 126 static inline const char *proto_name(u16 pid) in proto_name() argument 128 switch (pid) { in proto_name() 204 static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, in ppp_tx_cp() argument 217 if (pid == PID_LCP && (code == LCP_ECHO_REQ || code == LCP_ECHO_REPLY)) in ppp_tx_cp() 246 proto_name(pid), code_names[code], id, debug_buffer); in ppp_tx_cp() 249 ppp_hard_header(skb, dev, pid, NULL, NULL, 0); in ppp_tx_cp() 299 static void ppp_cp_event(struct net_device *dev, u16 pid, u1 argument 369 ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id, unsigned int req_len, const u8 *data) ppp_cp_parse_cr() argument 442 u16 pid; ppp_rx() local [all...] |
/kernel/linux/linux-6.6/kernel/bpf/ |
H A D | bpf_task_storage.c | 7 #include <linux/pid.h> 95 struct pid *pid; in bpf_pid_task_storage_lookup_elem() local 99 pid = pidfd_get_pid(fd, &f_flags); in bpf_pid_task_storage_lookup_elem() 100 if (IS_ERR(pid)) in bpf_pid_task_storage_lookup_elem() 101 return ERR_CAST(pid); in bpf_pid_task_storage_lookup_elem() 107 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_lookup_elem() 116 put_pid(pid); in bpf_pid_task_storage_lookup_elem() 119 put_pid(pid); in bpf_pid_task_storage_lookup_elem() 129 struct pid *pi in bpf_pid_task_storage_update_elem() local 180 struct pid *pid; bpf_pid_task_storage_delete_elem() local [all...] |
/base/hiviewdfx/faultloggerd/test/benchmarktest/unwinder/ |
H A D | unwind_remote_benchmark.cpp | 93 context.pid = tid;
in UnwinderRemoteFp() 101 static bool GetUnwinder(pid_t pid, void* data, std::shared_ptr<Unwinder>& unwinder, bool& isFp)
in GetUnwinder() argument 104 auto iter = unwinders_.find(pid);
in GetUnwinder() 108 unwinder = std::make_shared<Unwinder>(pid);
in GetUnwinder() 109 unwinders_[pid] = unwinder;
in GetUnwinder() 123 pid_t pid = fork();
in Run() local 124 if (pid == 0) {
in Run() 127 } else if (pid < 0) {
in Run() 130 if (!DfxPtrace::Attach(pid)) {
in Run() 131 DFXLOGE("Failed to attach pid in Run() [all...] |
/third_party/selinux/libselinux/src/ |
H A D | procattr.c | 83 static int openattr(pid_t pid, const char *attr, int flags) in openattr() argument 89 if (pid > 0) { in openattr() 90 rc = asprintf(&path, "/proc/%d/attr/%s", pid, attr); in openattr() 91 } else if (pid == 0) { in openattr() 115 pid_t pid, const char *attr) in getprocattrcon_raw() 159 fd = openattr(pid, attr, O_RDONLY | O_CLOEXEC); in getprocattrcon_raw() 198 pid_t pid, const char *attr) in getprocattrcon() 203 ret = getprocattrcon_raw(&rcontext, pid, attr); in getprocattrcon() 214 pid_t pid, const char *attr) in setprocattrcon_raw() 251 fd = openattr(pid, att in setprocattrcon_raw() 114 getprocattrcon_raw(char ** context, pid_t pid, const char *attr) getprocattrcon_raw() argument 197 getprocattrcon(char ** context, pid_t pid, const char *attr) getprocattrcon() argument 213 setprocattrcon_raw(const char * context, pid_t pid, const char *attr) setprocattrcon_raw() argument 282 setprocattrcon(const char * context, pid_t pid, const char *attr) setprocattrcon() argument [all...] |
/test/xts/acts/kernel_lite/mem_posix/src/ |
H A D | MremapApiTest.cpp | 83 pid_t pid = fork(); in HWTEST_F() local 84 EXPECT_TRUE(pid >= 0) << "Fork Error"; in HWTEST_F() 85 if (pid == 0) { in HWTEST_F() 99 WaitProcExitedOK(pid); in HWTEST_F() 125 pid_t pid = fork(); in HWTEST_F() local 126 EXPECT_TRUE(pid >= 0) << "Fork Error"; in HWTEST_F() 127 if (pid == 0) { in HWTEST_F() 137 ExpectProcCrashed(pid); in HWTEST_F() 165 pid_t pid = fork(); in HWTEST_F() local 166 EXPECT_TRUE(pid > in HWTEST_F() 209 pid_t pid = fork(); HWTEST_F() local 255 pid_t pid = fork(); HWTEST_F() local 307 pid_t pid = fork(); HWTEST_F() local 359 pid_t pid = fork(); HWTEST_F() local 415 pid_t pid = fork(); HWTEST_F() local [all...] |