diff --git a/testsuites/unittest/process/process/BUILD.gn b/testsuites/unittest/process/process/BUILD.gn index 8263c8cb137c10d8b957bac4a9f475d4ee75c11a..05c26d51cfda0c0d10133d5f562720dd3cbf6e8e 100644 --- a/testsuites/unittest/process/process/BUILD.gn +++ b/testsuites/unittest/process/process/BUILD.gn @@ -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", diff --git a/testsuites/unittest/process/process/smoke/process_test_031.cpp b/testsuites/unittest/process/process/full/process_test_031.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_031.cpp rename to testsuites/unittest/process/process/full/process_test_031.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_032.cpp b/testsuites/unittest/process/process/full/process_test_032.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_032.cpp rename to testsuites/unittest/process/process/full/process_test_032.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_033.cpp b/testsuites/unittest/process/process/full/process_test_033.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_033.cpp rename to testsuites/unittest/process/process/full/process_test_033.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_034.cpp b/testsuites/unittest/process/process/full/process_test_034.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_034.cpp rename to testsuites/unittest/process/process/full/process_test_034.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_035.cpp b/testsuites/unittest/process/process/full/process_test_035.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_035.cpp rename to testsuites/unittest/process/process/full/process_test_035.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_036.cpp b/testsuites/unittest/process/process/full/process_test_036.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_036.cpp rename to testsuites/unittest/process/process/full/process_test_036.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_037.cpp b/testsuites/unittest/process/process/full/process_test_037.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_037.cpp rename to testsuites/unittest/process/process/full/process_test_037.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_042.cpp b/testsuites/unittest/process/process/full/process_test_042.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_042.cpp rename to testsuites/unittest/process/process/full/process_test_042.cpp diff --git a/testsuites/unittest/process/process/smoke/process_test_055.cpp b/testsuites/unittest/process/process/full/process_test_055.cpp similarity index 100% rename from testsuites/unittest/process/process/smoke/process_test_055.cpp rename to testsuites/unittest/process/process/full/process_test_055.cpp diff --git a/testsuites/unittest/process/process/process_process_test.cpp b/testsuites/unittest/process/process/process_process_test.cpp index 73cc347a109ecdf4944d680cf4cc31f204de0cbe..d20404871a79a3f55a13d53dec0ea80b467a4141 100644 --- a/testsuites/unittest/process/process/process_process_test.cpp +++ b/testsuites/unittest/process/process/process_process_test.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. diff --git a/testsuites/unittest/process/pthread/BUILD.gn b/testsuites/unittest/process/pthread/BUILD.gn index 309c51c568ec819698378a32af033f84bd18a235..728a6fe4e0cdad61404ffd1f90b4e8d5cc6f9bb0 100644 --- a/testsuites/unittest/process/pthread/BUILD.gn +++ b/testsuites/unittest/process/pthread/BUILD.gn @@ -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) { diff --git a/testsuites/unittest/process/pthread/smoke/pthread_test_001.cpp b/testsuites/unittest/process/pthread/full/pthread_test_001.cpp similarity index 100% rename from testsuites/unittest/process/pthread/smoke/pthread_test_001.cpp rename to testsuites/unittest/process/pthread/full/pthread_test_001.cpp diff --git a/testsuites/unittest/process/pthread/smoke/pthread_test_002.cpp b/testsuites/unittest/process/pthread/full/pthread_test_002.cpp similarity index 100% rename from testsuites/unittest/process/pthread/smoke/pthread_test_002.cpp rename to testsuites/unittest/process/pthread/full/pthread_test_002.cpp diff --git a/testsuites/unittest/process/pthread/smoke/pthread_test_014.cpp b/testsuites/unittest/process/pthread/full/pthread_test_014.cpp similarity index 100% rename from testsuites/unittest/process/pthread/smoke/pthread_test_014.cpp rename to testsuites/unittest/process/pthread/full/pthread_test_014.cpp diff --git a/testsuites/unittest/process/pthread/process_pthread_test.cpp b/testsuites/unittest/process/pthread/process_pthread_test.cpp index e29aeb8e59561d53c19dfdcb2959bc8cf268617d..cf49b31676c7dbda41b63b38e5d93b453676e226 100644 --- a/testsuites/unittest/process/pthread/process_pthread_test.cpp +++ b/testsuites/unittest/process/pthread/process_pthread_test.cpp @@ -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 diff --git a/testsuites/unittest/process/pthread/smoke/pthread_cond_test_001.cpp b/testsuites/unittest/process/pthread/smoke/pthread_cond_test_001.cpp index 42336efcef866f383ffd658923cedf57b45bd5d5..ed5debcaf2fc937fcfb7bb05d024622f1eada304 100644 --- a/testsuites/unittest/process/pthread/smoke/pthread_cond_test_001.cpp +++ b/testsuites/unittest/process/pthread/smoke/pthread_cond_test_001.cpp @@ -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++; diff --git a/testsuites/unittest/process/pthread/smoke/pthread_test_006.cpp b/testsuites/unittest/process/pthread/smoke/pthread_test_006.cpp index 460370e2ce389f948e29bfe65c0ad6b8cc6ff4d2..3846c74f2959171e73877643c59b7783b01e4bab 100644 --- a/testsuites/unittest/process/pthread/smoke/pthread_test_006.cpp +++ b/testsuites/unittest/process/pthread/smoke/pthread_test_006.cpp @@ -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;