提交 f6ac03d3 编写于 作者: Z zhushengle

fix: 修复进程线程不稳定用例

Close #I4F1XL
Signed-off-by: Nzhushengle <zhushengle@huawei.com>
Change-Id: Ifdde21a2ff4213218a0fa44ad17af0c15a426758
上级 e328c528
......@@ -69,16 +69,8 @@ sources_smoke = [
"smoke/process_test_027.cpp",
"smoke/process_test_029.cpp",
"smoke/process_test_030.cpp",
"smoke/process_test_031.cpp",
"smoke/process_test_032.cpp",
"smoke/process_test_033.cpp",
"smoke/process_test_034.cpp",
"smoke/process_test_035.cpp",
"smoke/process_test_036.cpp",
"smoke/process_test_037.cpp",
"smoke/process_test_038.cpp",
"smoke/process_test_039.cpp",
"smoke/process_test_042.cpp",
"smoke/process_test_043.cpp",
"smoke/process_test_044.cpp",
"smoke/process_test_045.cpp",
......@@ -86,7 +78,6 @@ sources_smoke = [
"smoke/process_test_047.cpp",
"smoke/process_test_048.cpp",
"smoke/process_test_054.cpp",
"smoke/process_test_055.cpp",
"smoke/process_test_061.cpp",
"smp/process_test_smp_001.cpp",
"smp/process_test_smp_002.cpp",
......@@ -100,11 +91,20 @@ sources_smoke = [
sources_full = [
"full/process_test_007.cpp",
"full/process_test_031.cpp",
"full/process_test_032.cpp",
"full/process_test_033.cpp",
"full/process_test_034.cpp",
"full/process_test_035.cpp",
"full/process_test_036.cpp",
"full/process_test_037.cpp",
"full/process_test_040.cpp",
"full/process_test_041.cpp",
"full/process_test_042.cpp",
"full/process_test_049.cpp",
"full/process_test_050.cpp",
"full/process_test_051.cpp",
"full/process_test_055.cpp",
"full/process_test_056.cpp",
"full/process_test_057.cpp",
"full/process_test_058.cpp",
......
......@@ -368,83 +368,6 @@ HWTEST_F(ProcessProcessTest, ItTestProcess030, TestSize.Level0)
ItTestProcess030();
}
/* *
* @tc.name: it_test_process_031
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess031, TestSize.Level0)
{
ItTestProcess031();
}
/* *
* @tc.name: it_test_process_032
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess032, TestSize.Level0)
{
ItTestProcess032();
}
/* *
* @tc.name: it_test_process_033
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess033, TestSize.Level0)
{
ItTestProcess033();
}
/* *
* @tc.name: it_test_process_034
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess034, TestSize.Level0)
{
ItTestProcess034();
}
/* *
* @tc.name: it_test_process_035
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess035, TestSize.Level0)
{
ItTestProcess035();
}
/* *
* @tc.name: it_test_process_036
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess036, TestSize.Level0)
{
ItTestProcess036();
}
/* *
* @tc.name: it_test_process_037
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess037, TestSize.Level0)
{
ItTestProcess037();
}
/* *
* @tc.name: it_test_process_038
* @tc.desc: function for ProcessProcessTest
......@@ -467,17 +390,6 @@ HWTEST_F(ProcessProcessTest, ItTestProcess039, TestSize.Level0)
ItTestProcess039();
}
/* *
* @tc.name: it_test_process_042
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess042, TestSize.Level0)
{
ItTestProcess042();
}
/* *
* @tc.name: it_test_process_043
* @tc.desc: function for ProcessProcessTest
......@@ -555,17 +467,6 @@ HWTEST_F(ProcessProcessTest, ItTestProcess054, TestSize.Level0)
ItTestProcess054();
}
/* *
* @tc.name: it_test_process_055
* @tc.desc: function for waitid:To test the function of transferring different parameters of the waitid.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess055, TestSize.Level0)
{
ItTestProcess055();
}
/* *
* @tc.name: it_test_process_061
* @tc.desc: function for killpg: The killpg parameter is incorrect and the error code is verified.
......@@ -680,6 +581,83 @@ HWTEST_F(ProcessProcessTest, ItTestProcess007, TestSize.Level0)
ItTestProcess007();
}
/* *
* @tc.name: it_test_process_031
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess031, TestSize.Level0)
{
ItTestProcess031();
}
/* *
* @tc.name: it_test_process_032
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess032, TestSize.Level0)
{
ItTestProcess032();
}
/* *
* @tc.name: it_test_process_033
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess033, TestSize.Level0)
{
ItTestProcess033();
}
/* *
* @tc.name: it_test_process_034
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess034, TestSize.Level0)
{
ItTestProcess034();
}
/* *
* @tc.name: it_test_process_035
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess035, TestSize.Level0)
{
ItTestProcess035();
}
/* *
* @tc.name: it_test_process_036
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess036, TestSize.Level0)
{
ItTestProcess036();
}
/* *
* @tc.name: it_test_process_037
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess037, TestSize.Level0)
{
ItTestProcess037();
}
/* *
* @tc.name: it_test_process_040
* @tc.desc: function for ProcessProcessTest
......@@ -702,6 +680,17 @@ HWTEST_F(ProcessProcessTest, ItTestProcess041, TestSize.Level0)
ItTestProcess041();
}
/* *
* @tc.name: it_test_process_042
* @tc.desc: function for ProcessProcessTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessProcessTest, ItTestProcess042, TestSize.Level0)
{
ItTestProcess042();
}
/* *
* @tc.name: it_test_process_053
* @tc.desc: function for killpg:Sends a signal to the process group,
......@@ -714,6 +703,17 @@ HWTEST_F(ProcessProcessTest, ItTestProcess053, TestSize.Level0)
ItTestProcess053();
}
/* *
* @tc.name: it_test_process_055
* @tc.desc: function for waitid:To test the function of transferring different parameters of the waitid.
* @tc.type: FUNC
* @tc.require: AR000E0QAB
*/
HWTEST_F(ProcessProcessTest, ItTestProcess055, TestSize.Level0)
{
ItTestProcess055();
}
/* *
* @tc.name: it_test_process_062
* @tc.desc: function for killpg:Fork two processes. The killpg sends a signal to the current process group.
......
......@@ -49,8 +49,6 @@ sources_smoke = [
"smoke/pthread_cond_test_003.cpp",
"smoke/pthread_cond_test_004.cpp",
"smoke/pthread_once_test_001.cpp",
"smoke/pthread_test_001.cpp",
"smoke/pthread_test_002.cpp",
"smoke/pthread_test_003.cpp",
"smoke/pthread_test_006.cpp",
"smoke/pthread_test_007.cpp",
......@@ -60,7 +58,6 @@ sources_smoke = [
"smoke/pthread_test_011.cpp",
"smoke/pthread_test_012.cpp",
"smoke/pthread_test_013.cpp",
"smoke/pthread_test_014.cpp",
"smoke/pthread_test_015.cpp",
"smoke/pthread_test_016.cpp",
"smoke/pthread_test_017.cpp",
......@@ -69,8 +66,11 @@ sources_smoke = [
]
sources_full = [
"full/pthread_test_001.cpp",
"full/pthread_test_002.cpp",
"full/pthread_test_004.cpp",
"full/pthread_test_005.cpp",
"full/pthread_test_014.cpp",
]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
......
......@@ -52,30 +52,6 @@ public:
};
#if defined(LOSCFG_USER_TEST_SMOKE)
/* *
* @tc.name: it_test_pthread_001
* @tc.desc: function for ProcessPthreadTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessPthreadTest, ItTestPthread001, TestSize.Level0)
{
ItTestPthread001();
}
#ifndef LOSCFG_USER_TEST_SMP
/* *
* @tc.name: it_test_pthread_002
* @tc.desc: function for ProcessPthreadTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessPthreadTest, ItTestPthread002, TestSize.Level0)
{
ItTestPthread002();
}
#endif
/* *
* @tc.name: it_test_pthread_003
* @tc.desc: function for ProcessPthreadTest
......@@ -179,19 +155,6 @@ HWTEST_F(ProcessPthreadTest, ItTestPthread013, TestSize.Level0)
ItTestPthread013();
}
#ifndef LOSCFG_USER_TEST_SMP
/* *
* @tc.name: it_test_pthread_014
* @tc.desc: function for ProcessPthreadTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessPthreadTest, ItTestPthread014, TestSize.Level0)
{
ItTestPthread014();
}
#endif
/* *
* @tc.name: it_test_pthread_015
* @tc.desc: function for ProcessPthreadTest
......@@ -328,6 +291,29 @@ HWTEST_F(ProcessPthreadTest, ItTestPthreadCond004, TestSize.Level0)
#endif
#if defined(LOSCFG_USER_TEST_FULL)
/* *
* @tc.name: it_test_pthread_001
* @tc.desc: function for ProcessPthreadTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessPthreadTest, ItTestPthread001, TestSize.Level0)
{
ItTestPthread001();
}
#ifndef LOSCFG_USER_TEST_SMP
/* *
* @tc.name: it_test_pthread_002
* @tc.desc: function for ProcessPthreadTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessPthreadTest, ItTestPthread002, TestSize.Level0)
{
ItTestPthread002();
}
#endif
/* *
* @tc.name: it_test_pthread_004
* @tc.desc: function for ProcessPthreadTest
......@@ -349,5 +335,19 @@ HWTEST_F(ProcessPthreadTest, ItTestPthread005, TestSize.Level0)
{
ItTestPthread005();
}
#ifndef LOSCFG_USER_TEST_SMP
/* *
* @tc.name: it_test_pthread_014
* @tc.desc: function for ProcessPthreadTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(ProcessPthreadTest, ItTestPthread014, TestSize.Level0)
{
ItTestPthread014();
}
#endif
#endif
} // namespace OHOS
......@@ -41,7 +41,7 @@ static void *PthreadF01(void *t)
ICUNIT_GOTO_EQUAL(rc, 0, rc, EXIT);
g_testCount++;
LosTaskDelay(1);
LosTaskDelay(100);
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, here assert the result.
g_testCount++;
......
......@@ -125,6 +125,8 @@ static int Testcase(void)
ret = pthread_create(&newPthread[index], &a, ThreadFuncTest2, &threadParam[index]);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
sleep(1);
ICUNIT_ASSERT_EQUAL(g_testToCount001, testCount, g_testToCount001);
index = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册