/kernel/liteos_a/testsuites/unittest/container/full/ |
D | It_pid_container_002.cpp | 41 int childPid; in ChildFunClone3() local 56 childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone3() 58 if (childPid == -1) { in ChildFunClone3() 62 ret = waitpid(childPid, &status, 0); in ChildFunClone3() 63 if (ret != childPid) { in ChildFunClone3() 88 int childPid = clone(ChildFunClone3, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone2() local 89 if (childPid == -1) { in ChildFunClone2() 114 int childPid = clone(ChildFunClone2, NULL, CLONE_NEWPID | SIGCHLD, NULL); in ChildFunClone1() local 115 if (childPid == -1) { in ChildFunClone1() 119 auto linkBuffer = ReadlinkContainer(childPid, containerType); in ChildFunClone1() [all …]
|
D | It_pid_container_004.cpp | 45 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ChildFunClone2() local 46 if (childPid != -1) { in ChildFunClone2() 66 int childPid = clone(ChildFunClone2, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ChildFunClone1() local 67 if (childPid == -1) { in ChildFunClone1() 72 ret = waitpid(childPid, &status, 0); in ChildFunClone1() 73 if (ret != childPid) { in ChildFunClone1() 96 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer004() local 98 ASSERT_NE(childPid, -1); in ItPidContainer004() 100 ret = waitpid(childPid, &status, 0); in ItPidContainer004() 101 ASSERT_EQ(ret, childPid); in ItPidContainer004()
|
D | It_pid_container_006.cpp | 49 int childPid = clone(ChildFun1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFun() local 50 if (childPid == -1) { in ChildFun() 55 ret = waitpid(childPid, &status, 0); in ChildFun() 63 childPid = clone(ChildFun1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFun() 64 if (childPid == -1) { in ChildFun() 69 ret = waitpid(childPid, &status, 0); in ChildFun() 88 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer006() local 90 ASSERT_NE(childPid, -1); in ItPidContainer006() 92 ret = waitpid(childPid, &status, 0); in ItPidContainer006() 93 ASSERT_EQ(ret, childPid); in ItPidContainer006()
|
D | It_pid_container_005.cpp | 55 int childPid = clone(ChildFunClone3, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone2() local 56 if (childPid == -1) { in ChildFunClone2() 61 ret = waitpid(childPid, &status, 0); in ChildFunClone2() 102 int childPid = clone(ChildFunClone2, (char *)pstk + STACK_SIZE, CLONE_NEWUTS | SIGCHLD, NULL); in ChildFunClone1() local 104 if (childPid == -1) { in ChildFunClone1() 108 ret = waitpid(childPid, &status, 0); in ChildFunClone1() 109 if (ret != childPid) { in ChildFunClone1() 130 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ItPidContainer005() local 132 ASSERT_NE(childPid, -1); in ItPidContainer005() 134 ret = waitpid(childPid, &status, 0); in ItPidContainer005() [all …]
|
D | It_pid_container_003.cpp | 44 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone2() local 47 return childPid; in ChildFunClone2() 55 int childPid; in ChildFunClone1() local 62 childPid = ChildFunClone2(); in ChildFunClone1() 63 if (childPid != -1) { in ChildFunClone1() 93 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer003() local 94 ASSERT_NE(childPid, -1); in ItPidContainer003() 96 ret = waitpid(childPid, &status, 0); in ItPidContainer003() 97 ASSERT_EQ(ret, childPid); in ItPidContainer003()
|
D | It_pid_container_001.cpp | 44 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer001() local 46 ASSERT_NE(childPid, -1); in ItPidContainer001() 48 ret = waitpid(childPid, &status, 0); in ItPidContainer001() 49 ASSERT_EQ(ret, childPid); in ItPidContainer001()
|
D | It_pid_container_011.cpp | 44 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer011() local 46 ASSERT_NE(childPid, -1); in ItPidContainer011() 48 ret = waitpid(childPid, &status, 0); in ItPidContainer011() 49 ASSERT_EQ(ret, childPid); in ItPidContainer011()
|
D | It_pid_container_016.cpp | 48 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer016() local 50 ASSERT_NE(childPid, -1); in ItPidContainer016() 52 ret = waitpid(childPid, &status, 0); in ItPidContainer016() 53 ASSERT_EQ(ret, childPid); in ItPidContainer016()
|
D | It_pid_container_017.cpp | 48 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer017() local 50 ASSERT_NE(childPid, -1); in ItPidContainer017() 52 ret = waitpid(childPid, &status, 0); in ItPidContainer017() 53 ASSERT_EQ(ret, childPid); in ItPidContainer017()
|
D | It_pid_container_012.cpp | 45 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer012() local 47 ASSERT_NE(childPid, -1); in ItPidContainer012() 49 ret = waitpid(childPid, &status, 0); in ItPidContainer012() 50 ASSERT_EQ(ret, childPid); in ItPidContainer012()
|
D | It_pid_container_015.cpp | 48 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer015() local 50 ASSERT_NE(childPid, -1); in ItPidContainer015() 52 ret = waitpid(childPid, &status, 0); in ItPidContainer015() 53 ASSERT_EQ(ret, childPid); in ItPidContainer015()
|
D | It_pid_container_010.cpp | 55 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer010() local 57 ASSERT_NE(childPid, -1); in ItPidContainer010() 59 ret = waitpid(childPid, &status, 0); in ItPidContainer010() 60 ASSERT_EQ(ret, childPid); in ItPidContainer010()
|
D | It_pid_container_007.cpp | 62 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer007() local 64 ASSERT_NE(childPid, -1); in ItPidContainer007() 66 ret = waitpid(childPid, &status, 0); in ItPidContainer007() 67 ASSERT_EQ(ret, childPid); in ItPidContainer007()
|
D | It_pid_container_013.cpp | 57 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer013() local 59 ASSERT_NE(childPid, -1); in ItPidContainer013() 61 ret = waitpid(childPid, &status, 0); in ItPidContainer013() 62 ASSERT_EQ(ret, childPid); in ItPidContainer013()
|
D | It_pid_container_021.cpp | 62 int childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer021() local 64 ASSERT_NE(childPid, -1); in ItPidContainer021() 66 ret = waitpid(childPid, &status, 0); in ItPidContainer021() 67 ASSERT_EQ(ret, childPid); in ItPidContainer021()
|
/kernel/liteos_a/testsuites/unittest/container/smoke/ |
D | It_pid_container_027.cpp | 55 int childPid = clone(ChildFunClone3, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone2() local 56 if (childPid == -1) { in ChildFunClone2() 61 ret = waitpid(childPid, &status, 0); in ChildFunClone2() 105 int childPid = clone(ChildFunClone2, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone1() local 107 if (childPid == -1) { in ChildFunClone1() 116 ret = waitpid(childPid, &status, 0); in ChildFunClone1() 117 if (ret != childPid) { in ChildFunClone1() 136 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ItPidContainer027() local 138 ASSERT_NE(childPid, -1); in ItPidContainer027() 141 int ret = waitpid(childPid, &status, 0); in ItPidContainer027() [all …]
|
D | It_pid_container_028.cpp | 55 int childPid = clone(ChildFunClone3, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone2() local 56 if (childPid == -1) { in ChildFunClone2() 61 ret = waitpid(childPid, &status, 0); in ChildFunClone2() 103 int childPid = clone(ChildFunClone2, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone1() local 105 if (childPid == -1) { in ChildFunClone1() 114 ret = waitpid(childPid, &status, 0); in ChildFunClone1() 115 if (ret != childPid) { in ChildFunClone1() 134 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ItPidContainer028() local 136 ASSERT_NE(childPid, -1); in ItPidContainer028() 139 int ret = waitpid(childPid, &status, 0); in ItPidContainer028() [all …]
|
D | It_net_container_004.cpp | 59 auto childPid = clone(NewnetChildFun, stackTop, SIGCHLD | CLONE_NEWNET, &arg); in ChildFun() local 60 if (childPid == -1) { in ChildFun() 65 if (sprintf_s(path, TEST_PATH_MAX, "/proc/%d/container/net", childPid) < 0) { in ChildFun() 66 (void)waitpid(childPid, &status, 0); in ChildFun() 92 ret = waitpid(childPid, &status, 0); in ChildFun() 93 if (ret != childPid) { in ChildFun() 113 auto childPid = clone(ChildFun, stackTop, SIGCHLD | CLONE_NEWNET, &arg); in ItNetContainer004() local 114 ASSERT_NE(childPid, -1); in ItNetContainer004() 116 int ret = waitpid(childPid, &status, 0); in ItNetContainer004() 117 ASSERT_EQ(ret, childPid); in ItNetContainer004()
|
D | It_pid_container_031.cpp | 57 int childPid = clone(ChildFun1, NULL, CLONE_NEWPID | SIGCHLD, NULL); in ChildFun() local 58 if (childPid == -1) { in ChildFun() 61 auto linkBuffer2 = ReadlinkContainer(childPid, containerType); in ChildFun() 67 ret = sprintf_s(targetpath, BUF_SIZE, "/proc/%d/container/pid", childPid); in ChildFun() 127 ret = WaitChild(childPid, &status, EXIT_CODE_ERRNO_14, EXIT_CODE_ERRNO_15); in ChildFun() 137 int childPid = clone(ChildFun, NULL, CLONE_NEWPID | SIGCHLD, NULL); in ItPidContainer031() local 138 ASSERT_NE(childPid, -1); in ItPidContainer031() 140 int ret = waitpid(childPid, &status, 0); in ItPidContainer031() 141 ASSERT_EQ(ret, childPid); in ItPidContainer031()
|
D | It_pid_container_030.cpp | 82 int childPid = clone(ChildFunClone2, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ChildFunClone1() local 83 if (childPid == -1) { in ChildFunClone1() 88 auto linkBuffer2 = ReadlinkContainer(childPid, containerType); in ChildFunClone1() 112 ret = WaitChild(childPid, &status, EXIT_CODE_ERRNO_11, EXIT_CODE_ERRNO_12); in ChildFunClone1() 124 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ItPidContainer030() local 126 ASSERT_NE(childPid, -1); in ItPidContainer030() 129 int ret = waitpid(childPid, &status, 0); in ItPidContainer030() 130 ASSERT_EQ(ret, childPid); in ItPidContainer030()
|
D | It_mnt_container_008.cpp | 47 int childPid; in ItMntContainer008() local 62 childPid = clone(ChildFun, (char *)pstk + STACK_SIZE, CLONE_NEWNS, nullptr); in ItMntContainer008() 63 ASSERT_NE(childPid, -1); in ItMntContainer008() 68 ret = sprintf_s(targetpath, PATH_LENGTH, "/proc/%d/container/mnt", childPid); in ItMntContainer008() 85 ret = waitpid(childPid, &status, 0); in ItMntContainer008() 86 ASSERT_EQ(ret, childPid); in ItMntContainer008()
|
D | It_uts_container_005.cpp | 45 int childPid; in UtsContainerTest() local 52 childPid = clone(ChildFun, NULL, CLONE_NEWUTS | SIGCHLD, NULL); in UtsContainerTest() 53 if (childPid == -1) { in UtsContainerTest() 62 ret = sprintf_s(targetpath, sizeof(targetpath), "/proc/%d/container/uts", childPid); in UtsContainerTest() 86 ret = waitpid(childPid, &status, 0); in UtsContainerTest() 87 if (ret != childPid) { in UtsContainerTest()
|
D | It_pid_container_029.cpp | 81 int childPid = clone(ChildFunClone2, (char *)pstk + STACK_SIZE, CLONE_NEWPID | SIGCHLD, NULL); in ChildFunClone1() local 82 if (childPid != -1) { in ChildFunClone1() 118 int childPid = clone(ChildFunClone1, (char *)pstk + STACK_SIZE, SIGCHLD, NULL); in ItPidContainer029() local 120 ASSERT_NE(childPid, -1); in ItPidContainer029() 123 int ret = waitpid(childPid, &status, 0); in ItPidContainer029() 124 ASSERT_EQ(ret, childPid); in ItPidContainer029()
|
D | It_ipc_container_002.cpp | 83 pid_t childPid; in ItIpcContainer002() local 127 childPid = clone(childFunc, stackTop, CLONE_NEWIPC | SIGCHLD, &arg); in ItIpcContainer002() 128 ASSERT_NE(childPid, -1); in ItIpcContainer002() 132 childlink = ReadlinkContainer(childPid, containerType); in ItIpcContainer002() 133 filePath = GenContainerLinkPath(childPid, containerType); in ItIpcContainer002() 143 ret = waitpid(childPid, &status, 0); in ItIpcContainer002() 144 ASSERT_EQ(ret, childPid); in ItIpcContainer002()
|
/kernel/liteos_a/testsuites/unittest/basic/mem/shm/full/ |
D | shm_test_009.cpp | 75 static void KillChildren(int childPid) in KillChildren() argument 77 kill(childPid, SIGTERM); in KillChildren() 83 int childPid, oldcount, newcount, shmid; in Testcase() local 118 childPid = fork(); in Testcase() 119 ICUNIT_GOTO_NOT_EQUAL(childPid, -1, childPid, OUT_SCHEDULER); in Testcase() 121 if (childPid == 0) { in Testcase() 129 ret = sched_setparam(childPid, ¶m); in Testcase() 138 KillChildren(childPid); in Testcase() 139 pid = waitpid(childPid, NULL, 0); in Testcase() 140 ICUNIT_ASSERT_EQUAL(pid, childPid, pid); in Testcase()
|