Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 128) sorted by relevance

123456

/test/xts/acts/kernel_lite/process_posix/src/
DProcessTest.cpp42 pid_t pid; variable
46 pid = fork();
47 ASSERT_TRUE(pid >= 0) << "> parent: fork errno = " << errno;
48 if (pid == 0) {
53 ASSERT_EQ(CheckProcStatus(pid, &exitCode, 0), 1);
68 pid_t pid; variable
70 pid = fork();
71 ASSERT_TRUE(pid >= 0) << "> parent: fork errno = " << errno;
72 if (pid == 0) {
84 WaitProcExitedOK(pid);
[all …]
DPidTest.cpp41 pid_t pid = fork(); variable
42 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
43 if (pid == 0) { // child
52 WaitProcExitedOK(pid);
74 pid_t pid = fork(); variable
75 EXPECT_TRUE(pid >= 0) << "======== Fork Error! =========";
76 if (pid == 0) { // child
107 WaitProcExitedOK(pid);
133 pid_t pid = fork(); variable
134 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
[all …]
/test/xts/acts/kernel_lite/dyload_posix/
DExecApiTest.cpp39 pid_t pid = fork(); variable
40 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
41 if (pid == 0) { // child
49 WaitProcExitedOK(pid);
59 pid_t pid = fork(); variable
60 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
61 if (pid == 0) { // child
71 WaitProcExitedOK(pid);
84 pid_t pid = fork(); variable
85 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
[all …]
DDlopenTest.cpp46 pid_t pid = fork(); variable
47 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
48 if (pid == 0) { // child
74 WaitProcExitedOK(pid);
100 pid_t pid = fork(); variable
101 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
102 if (pid == 0) { // child
140 WaitProcExitedOK(pid);
195 pid_t pid = fork(); variable
196 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
[all …]
/test/xts/acts/kernel_lite/utils/
Dutils.h56 int CheckProcStatus(pid_t pid, int* code, int flag = WNOHANG);
59 #define AssertProcAlive(pid) do { \ argument
61 int procStat = CheckProcStatus(pid, &exitCode); \
64 #define ExpectProcAlive(pid) do { \ argument
66 int procStat = CheckProcStatus(pid, &exitCode); \
71 #define AssertProcExitedOK(pid) do { \ argument
73 int procStat = CheckProcStatus(pid, &exitCode); \
77 #define ExpectProcExitedOK(pid) do { \ argument
79 int procStat = CheckProcStatus(pid, &exitCode); \
84 #define WaitProcExitedOK(pid) do { \ argument
[all …]
Dutils.cpp71 int CheckProcStatus(pid_t pid, int *code, int flag) in CheckProcStatus() argument
74 int rt = waitpid(pid, &status, flag); in CheckProcStatus()
81 } else if (rt != pid) { // waitpid return error in CheckProcStatus()
109 int pid = fork(); in StartElf() local
110 if (pid == -1) { in StartElf()
113 } else if (pid == 0) { // child in StartElf()
123 return pid; in StartElf()
137 int pid = StartElf(fname, argv, envp); in RunElf() local
138 if (pid == -1) { // fork error in RunElf()
151 if (kill(pid, SIGKILL) == -1) { in RunElf()
[all …]
/test/xts/hats/kernel/posix_interface/interface_gn/utils/
Dutils.cpp70 int CheckProcStatus(pid_t pid, int *code, int flag) in CheckProcStatus() argument
73 int rt = waitpid(pid, &status, flag); in CheckProcStatus()
81 } else if (rt != pid) { // waitpid return error in CheckProcStatus()
107 void AssertProcAlive(pid_t pid) in AssertProcAlive() argument
110 int procStat = CheckProcStatus(pid, &exitCode); in AssertProcAlive()
114 void ExpectProcAlive(pid_t pid) in ExpectProcAlive() argument
117 int procStat = CheckProcStatus(pid, &exitCode); in ExpectProcAlive()
121 void AssertProcExitedOK(pid_t pid) in AssertProcExitedOK() argument
125 int procStat = CheckProcStatus(pid, &exitCode); in AssertProcExitedOK()
130 void ExpectProcExitedOK(pid_t pid) in ExpectProcExitedOK() argument
[all …]
Dutils.h53 int CheckProcStatus(pid_t pid, int* code, int flag = WNOHANG);
56 void AssertProcAlive(pid_t pid);
57 void ExpectProcAlive(pid_t pid);
60 void AssertProcExitedOK(pid_t pid);
61 void ExpectProcExitedOK(pid_t pid);
64 void WaitProcExitedOK(pid_t pid);
67 void AssertProcKilled(pid_t pid, int signum);
68 void ExpectProcKilled(pid_t pid, int signum);
71 void WaitProcKilled(pid_t pid, int signum);
/test/testfwk/arkxtest/uitest/test/
Dipc_transactor_test.cpp41 static string WaitPidAndReadPipe(pid_t pid, PipeFds fds) in WaitPidAndReadPipe() argument
47 waitpid(pid, &status, 0); in WaitPidAndReadPipe()
85 auto pid = fork(); in TEST_P() local
86 ASSERT_NE(pid, -1); in TEST_P()
87 if (pid == 0) { in TEST_P()
96 pid = fork(); in TEST_P()
97 ASSERT_NE(pid, -1); in TEST_P()
98 if (pid == 0) { in TEST_P()
111 auto clientOutput = WaitPidAndReadPipe(pid, fds); in TEST_P()
123 auto pid = fork(); in TEST() local
[all …]
/test/xts/acts/kernel_lite/ipc_posix/signal/
DSignalTest.cpp90 pid_t pid = fork(); variable
91 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
92 if (pid == 0) { // child
103 WaitProcExitedOK(pid);
116 pid_t pid = fork(); variable
117 ASSERT_TRUE(pid >= 0) << "======== Fork Error! =========";
118 if (pid > 0) { // parent
122 kill(pid, SIGKILL);
124 WaitProcKilled(pid, SIGKILL);
145 pid_t pid = fork(); variable
[all …]
/test/xts/hats/kernel/rtginterface/
Drtg_interface_test.cpp137 int pid = getpid(); variable
140 ret = AddThreadToRtg(pid, grpId);
172 int pid = getpid(); variable
175 ret = AddThreadToRtg(pid, (grpId + 1));
177 ret = AddThreadToRtg(pid, -1);
192 int pid = getpid(); variable
194 pids.push_back(pid);
213 int pid = getpid(); variable
215 pids.push_back(pid);
266 int pid = getpid(); variable
[all …]
/test/xts/acts/kernel_lite/mem_posix/src/
DMprotectApiTest.cpp55 pid_t pid = fork(); variable
56 EXPECT_TRUE(pid >= 0) << "Fork Error";
57 if (pid == 0) {
65 WaitProcExitedOK(pid);
88 pid_t pid = fork(); variable
89 EXPECT_TRUE(pid >= 0) << "Fork Error";
90 if (pid == 0) {
98 WaitProcExitedOK(pid);
127 pid_t pid = fork(); variable
128 EXPECT_TRUE(pid >= 0) << "Fork Error";
[all …]
DMmapApiTest.cpp59 pid_t pid = fork(); variable
60 EXPECT_TRUE(pid >= 0) << "Fork Error";
61 if (pid == 0) {
68 WaitProcExitedOK(pid);
93 pid_t pid = fork(); variable
94 EXPECT_TRUE(pid >= 0) << "Fork Error";
95 if (pid == 0) {
102 WaitProcExitedOK(pid);
127 pid_t pid = fork(); variable
128 EXPECT_TRUE(pid >= 0) << "Fork Error";
[all …]
DMremapApiTest.cpp83 pid_t pid = fork(); variable
84 EXPECT_TRUE(pid >= 0) << "Fork Error";
85 if (pid == 0) {
99 WaitProcExitedOK(pid);
125 pid_t pid = fork(); variable
126 EXPECT_TRUE(pid >= 0) << "Fork Error";
127 if (pid == 0) {
137 ExpectProcCrashed(pid);
165 pid_t pid = fork(); variable
166 EXPECT_TRUE(pid >= 0) << "Fork Error";
[all …]
/test/xts/hats/kernel/libmeminfoPc/
Dmeminfo_test.cpp52 int pid = 1; variable
54 size = GetRssByPid(pid);
61 int pid = -1; variable
63 size = GetRssByPid(pid);
69 int pid = 1; variable
71 size = GetPssByPid(pid);
80 int pid = -1; variable
82 size = GetPssByPid(pid);
/test/xts/tools/lite/reliability/
DNativePressTest.py58 for pid in testPID:
59 print("PID of each test process is:" + pid)
64 for pid in testPID:
65 print("PID of each test process is:" + pid)
66 cmdRet = exec_cmd(hdcPath + " shell \"cat /proc/" + pid + "/cmdline\"", waitOut=True)
68 print("PID " + str(pid) + " not exist,will remove it")
69 testPID.remove(pid)
72 print("PID " + str(pid) + " still exist")
76 for pid in testPID:
77 print("Process with pid " + pid + "will be killed.")
[all …]
/test/xts/acts/commonlibrary/toolchain/libc-test/src/
Dtoolchaintest.cpp49 int pid, spaceSize = 100 * 1024; in Start() local
52 pid = fork(); in Start()
53 if (pid == 0) { in Start()
60 return pid; in Start()
66 int status, pid; in RunTests() local
77 pid = Start(argvs); in RunTests()
79 if (pid == -1) { in RunTests()
95 if (kill(pid, SIGKILL) == -1) { in RunTests()
100 if (waitpid(pid, &status, 0) != pid) { in RunTests()
/test/xts/hats/kernel/freelist/modify_pointer/
DMalloc_modify_pointer.cpp115 pid_t pid; in start_child() local
117 pid = fork(); in start_child()
118 if (pid == 0) { in start_child()
123 return pid; in start_child()
134 pid_t pid; variable
143 pid = start_child();
144 if (pid == -1) {
154 if (kill(pid, SIGKILL) == -1) {
159 if (waitpid(pid, &status, 0) != pid) {
/test/xts/acts/kernel_lite/ipc_posix/pipe_fifo/
DPipeTest.cpp48 pid_t pid = fork(); variable
49 ASSERT_TRUE(pid >= 0) << "> parent: fork errno = " << errno;
50 if (pid == 0) {
71 WaitProcExitedOK(pid);
85 pid_t pid = fork(); variable
86 ASSERT_TRUE(pid >= 0) << "> parent: fork errno = " << errno;
87 if (pid == 0) { // child --- O_NONBLOCK R test, should be failed
110 WaitProcExitedOK(pid);
133 pid_t pid = fork(); variable
134 ASSERT_TRUE(pid >= 0) << "> parent: error : fork";
[all …]
DFifoTest.cpp54 pid_t pid = fork(); variable
55 ASSERT_TRUE(pid >= 0) << "> parent: fork : error";
56 if (pid == 0) {
75 WaitProcExitedOK(pid);
118 pid_t pid = fork(); variable
119 ASSERT_TRUE(pid >= 0) << "> parent : fork : error";
120 if (pid == 0) {
161 WaitProcExitedOK(pid);
182 pid_t pid = fork(); variable
183 ASSERT_TRUE(pid >= 0) << "> parent : fork : error";
[all …]
/test/xts/hats/kernel/freelist/encode_pointer/
DMalloc_encode_pointer.cpp124 pid_t pid; in start_child() local
126 pid = fork(); in start_child()
127 if (pid == 0) { in start_child()
132 return pid; in start_child()
143 pid_t pid; variable
152 pid = start_child();
153 if (pid == -1) {
163 if (kill(pid, SIGKILL) == -1) {
168 if (waitpid(pid, &status, 0) != pid) {
/test/xts/hats/kernel/freelist/safe_unlink/
DMalloc_safe_unlink.cpp134 pid_t pid; in start_child() local
136 pid = fork(); in start_child()
137 if (pid == 0) { in start_child()
142 return pid; in start_child()
153 pid_t pid; variable
162 pid = start_child();
163 if (pid == -1) {
173 if (kill(pid, SIGKILL) == -1) {
178 if (waitpid(pid, &status, 0) != pid) {
/test/xts/acts/kernel_lite/sys_posix/src/
DSysApiTest.cpp94 int pid; variable
95 pid = fork();
96 if (pid == 0) {
104 WaitProcExitedOK(pid);
116 int pid; variable
117 pid = fork();
118 if (pid == 0) {
127 WaitProcExitedOK(pid);
153 int pid; variable
154 pid = fork();
[all …]
/test/xts/acts/commonlibrary/thirdparty/musl/entry/src/main/cpp/
Dwaitndk.cpp31 int pid = PARAM_0; in do_plain_tests() local
32 pid = fork(); in do_plain_tests()
33 if (pid == FAIL) { in do_plain_tests()
36 if (pid == PARAM_0) { in do_plain_tests()
62 pid_t pid = fork(); in wait4test() local
66 pid_t wait4ForPind = wait4(pid, &status, options, &ru); in wait4test()
100 pid_t pid = fork(); in waitidtest() local
101 int result = waitid(P_PID, pid, &si, WEXITED); in waitidtest()
118 pid_t pid = fork(); in waitpidtest() local
119 pid_t waitpid_for_pind = waitpid(pid, &status, options); in waitpidtest()
/test/xts/device_attest/common/permission/src/
Dpermission.cpp39 pid_t pid = IPCSkeleton::GetCallingPid(); in IsSystem() local
43 static_cast<int32_t>(type), pid, uid); in IsSystem()
59 static_cast<int32_t>(type), pid, uid); in IsSystem()
68 pid_t pid = IPCSkeleton::GetCallingPid(); in IsPermissionGranted() local
72 perm.c_str(), static_cast<int32_t>(type), pid, uid); in IsPermissionGranted()
88 perm.c_str(), static_cast<int32_t>(type), pid, uid); in IsPermissionGranted()

123456