diff --git a/testsuites/sample/cmsis/cmsis_func_test.c b/testsuites/sample/cmsis/cmsis_func_test.c index 0bcfc9f91c214ccc0ab8b4f1c6e2a82900959ebd..f11604ec5c1c48a523a5d970625ca7517d4cb96e 100644 --- a/testsuites/sample/cmsis/cmsis_func_test.c +++ b/testsuites/sample/cmsis/cmsis_func_test.c @@ -352,15 +352,10 @@ LITE_TEST_CASE(CmsisFuncTestSuite, TestCmsis004, Function | MediumTest | Level1) ret = strcmp(staticBuff, strbuff); ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); - ret = osMessageQueueDelete(msgQueueId); - ICUNIT_ASSERT_EQUAL(ret, osOK, ret); -#endif - return LOS_OK; - EXIT: ret = osMessageQueueDelete(msgQueueId); ICUNIT_ASSERT_EQUAL(ret, osOK, ret); - +#endif return LOS_OK; } diff --git a/testsuites/sample/kernel/atomic/it_los_atomic_004.c b/testsuites/sample/kernel/atomic/it_los_atomic_004.c index fdd7ae6e9d767543d67c235711264430824c61dd..e7cc8de2af575ec34823bcb79d69374608c60747 100644 --- a/testsuites/sample/kernel/atomic/it_los_atomic_004.c +++ b/testsuites/sample/kernel/atomic/it_los_atomic_004.c @@ -46,7 +46,7 @@ static VOID TaskF01(VOID) ICUNIT_ASSERT_EQUAL_VOID(g_testAtomicID03, i, g_testAtomicID03); ICUNIT_ASSERT_EQUAL_VOID(ret, g_testAtomicID03, ret); - LOS_AtomicAdd(&g_testCount, 1); + LOS_AtomicAdd((Atomic *)(&g_testCount), 1); } static UINT32 TestCase(VOID) diff --git a/testsuites/sample/kernel/event/It_los_event_006.c b/testsuites/sample/kernel/event/It_los_event_006.c index a1fd62fa195f7801c4d5e28e52e84fff5eab019d..8a95dc263a08c64a5a8e143de92901a6f2855bb0 100644 --- a/testsuites/sample/kernel/event/It_los_event_006.c +++ b/testsuites/sample/kernel/event/It_los_event_006.c @@ -33,7 +33,7 @@ #include "osTest.h" #include "It_los_event.h" -static VOID TaskF01() +static VOID TaskF01(VOID) { UINT32 ret; diff --git a/testsuites/sample/kernel/hwi/it_los_hwi_033.c b/testsuites/sample/kernel/hwi/it_los_hwi_033.c index cd07c0fcf788748d4079ac9ca0ba2195f535b0ae..7502e3b9a378a0dbbbf673322c6e639da6323292 100644 --- a/testsuites/sample/kernel/hwi/it_los_hwi_033.c +++ b/testsuites/sample/kernel/hwi/it_los_hwi_033.c @@ -43,7 +43,6 @@ static VOID HwiF01(VOID) return; } -#define HWI_NUM_INT0 HWI_NUM_TEST1 static UINT32 Testcase(VOID) { UINT32 ret; diff --git a/testsuites/sample/posix/mqueue/It_posix_queue.h b/testsuites/sample/posix/mqueue/It_posix_queue.h index 6a931ddabf77497c7bea9ea259cfadbb9c32ce99..3c9a7825101bb5aa89c33e65e5e20f57515b9447 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue.h +++ b/testsuites/sample/posix/mqueue/It_posix_queue.h @@ -40,6 +40,7 @@ #include #include #include "pthread.h" +#include "unistd.h" #define MAXMSG5 5 #define MSGLEN 10 @@ -60,15 +61,11 @@ #define MQUEUE_MAX_NUM_TEST (LOSCFG_BASE_IPC_QUEUE_CONFIG - QUEUE_EXISTED_NUM) #define MQ_MAX_MSG_NUM 16 #define MQ_MAX_MSG_LEN 64 -#define HWI_NUM_TEST 1 -#define HWI_NUM_TEST1 2 #if (LOSCFG_LIBC_NEWLIB == 1) #define MQ_PRIO_MAX 1 #endif -#define LOSCFG_BASE_IPC_QUEUE_CONFIG 1024 - #define LOS_AtomicInc(a) (++*(a)) #define MqueueTaskDelay(tick) (usleep((tick) * 10000)) @@ -104,6 +101,7 @@ extern VOID ItSuitePosixMqueue(VOID); extern UINT32 PosixPthreadInit(pthread_attr_t *attr, int pri); extern UINT32 PosixPthreadDestroy(pthread_attr_t *attr, pthread_t thread); extern VOID TestAssertWaitDelay(UINT32 *testCount, UINT32 flag); +extern VOID TestExtraTaskDelay(UINT32 tick); VOID ItPosixQueue001(VOID); VOID ItPosixQueue002(VOID); diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_030.c b/testsuites/sample/posix/mqueue/It_posix_queue_030.c index 0d88d590533e518b5d391c97f6b1e035cf8f9aa0..f5124d22f347ba15d11edbb5d601fb6641b09342 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_030.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_030.c @@ -34,8 +34,6 @@ static UINT32 Testcase(VOID) CHAR qname[MQUEUE_STANDARD_NAME_LENGTH] = ""; const CHAR *msgptr = MQUEUE_SEND_STRING_TEST; mqd_t queue; - INT32 unresolved = 0; - INT32 failure = 0; INT32 ret = 0; ret = snprintf_s(qname, MQUEUE_STANDARD_NAME_LENGTH, MQUEUE_STANDARD_NAME_LENGTH - 1, \ diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_039.c b/testsuites/sample/posix/mqueue/It_posix_queue_039.c index a56d0dee117f4b71d4fea28aacdfca0dd43dca6e..99be503e94d4e8e6d0f8b93abe2fbd5b18268300 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_039.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_039.c @@ -34,8 +34,6 @@ static UINT32 Testcase(VOID) CHAR mqname[MQUEUE_STANDARD_NAME_LENGTH], msgrv[MQUEUE_STANDARD_NAME_LENGTH]; mqd_t mqdes; struct mq_attr attr = {0}; - INT32 unresolved = 0; - INT32 failure = 0; INT32 ret = 0; ret = snprintf_s(mqname, MQUEUE_STANDARD_NAME_LENGTH, MQUEUE_STANDARD_NAME_LENGTH - 1, \ diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_041.c b/testsuites/sample/posix/mqueue/It_posix_queue_041.c index 7262e6799a0a1a73fa81feb84d58ce67d9b37702..13247092913050490d2c302672863292400f5c0a 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_041.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_041.c @@ -35,8 +35,6 @@ static UINT32 Testcase(VOID) mqd_t mqdes; CHAR msgrv[MQUEUE_STANDARD_NAME_LENGTH]; struct mq_attr attr = {0}; - INT32 unresolved = 0; - INT32 failure = 0; INT32 ret = 0; ret = snprintf_s(mqname, MQUEUE_STANDARD_NAME_LENGTH, MQUEUE_STANDARD_NAME_LENGTH - 1, \ diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_045.c b/testsuites/sample/posix/mqueue/It_posix_queue_045.c index 703195c9a2bd3a90a64916fee17d74fea736edc7..463fa28a4ffe11dd030708a58f68f691f097ad90 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_045.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_045.c @@ -34,8 +34,6 @@ static UINT32 Testcase(VOID) CHAR mqname[MQUEUE_STANDARD_NAME_LENGTH] = ""; mqd_t mqdes; struct mq_attr mqstat, nmqstat; - INT32 unresolved = 0; - INT32 failure = 0; INT32 ret = 0; ret = snprintf_s(mqname, MQUEUE_STANDARD_NAME_LENGTH, MQUEUE_STANDARD_NAME_LENGTH - 1, \ diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_048.c b/testsuites/sample/posix/mqueue/It_posix_queue_048.c index 7002ae78325b02e76362223403983dd678e952b0..baa7c78716fdbb404a87cd30a0df1cba235dc887 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_048.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_048.c @@ -35,8 +35,6 @@ static UINT32 Testcase(VOID) mqd_t mqdes; struct mq_attr mqstat = {0}; struct mq_attr nmqstat = {0}; - INT32 unresolved = 0; - INT32 failure = 0; INT32 ret = 0; ret = snprintf_s(mqname, MQUEUE_STANDARD_NAME_LENGTH, MQUEUE_STANDARD_NAME_LENGTH - 1, \ diff --git a/testsuites/sample/posix/pthread/It_posix_pthread.h b/testsuites/sample/posix/pthread/It_posix_pthread.h index be4c7157df585f43ac5a002b4311ede1a9e48af3..26d764b38b5cfd9f731a11ceedd9d5799b360a02 100644 --- a/testsuites/sample/posix/pthread/It_posix_pthread.h +++ b/testsuites/sample/posix/pthread/It_posix_pthread.h @@ -42,11 +42,6 @@ #include "mqueue.h" #include "signal.h" -/* Some routines are part of the XSI Extensions */ -#ifndef WITHOUT_XOPEN -#define _XOPEN_SOURCE 600 -#endif - #define PTHREAD_IS_ERROR (-1) #define PTHREAD_PRIORITY_TEST 20 #define PTHREAD_DEFAULT_STACK_SIZE (LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE) @@ -71,9 +66,6 @@ /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */ #define _POSIX_C_SOURCE 200112L -#define PTHREAD_MUTEX_RECURSIVE 0 -#define PTHREAD_MUTEX_ERRORCHECK 0 - #define PRIORITY_OTHER (-1) #define PRIORITY_FIFO 20 #define PRIORITY_RR 20 diff --git a/testsuites/src/iCunit.c b/testsuites/src/iCunit.c index 8a96e1a19847c8ee896fd2df80a38d67be2b7d88..e9578c7947ed5a947f82d85947fe43a450e2d872 100644 --- a/testsuites/src/iCunit.c +++ b/testsuites/src/iCunit.c @@ -102,7 +102,7 @@ char *g_strType[] = { "FUNCTION", "PRESSURE", "PERFORMANCE" }; -iUINT32 ICunitRunF() +iUINT32 ICunitRunF(void) { iUINT32 idx, idx1; ICUNIT_CASE_S *psubCaseArray; diff --git a/testsuites/src/osTest.c b/testsuites/src/osTest.c index 62a60a72d1401608b7125aa7dc56f69f15e9cb07..4ac14f1583200ddae26e7c72cf942500993f6e9e 100644 --- a/testsuites/src/osTest.c +++ b/testsuites/src/osTest.c @@ -231,7 +231,7 @@ void TestCmsis2(void) } #endif -VOID TestTaskEntry() +VOID TestTaskEntry(void) { PRINTF("\t\n --- Test Start --- \n\n"); ICunitInit(); diff --git a/testsuites/unittest/posix/src/kernel_test.h b/testsuites/unittest/posix/src/kernel_test.h index e98387d0d282beab04794a51d0fbd8b026a79b77..b59c16d9278f2d5f87c37bd7f80c868aa2b2c7e3 100644 --- a/testsuites/unittest/posix/src/kernel_test.h +++ b/testsuites/unittest/posix/src/kernel_test.h @@ -42,8 +42,6 @@ #define DELAY_TICKS_5 5 #define DELAY_TICKS_10 10 -#define TEST_TASK_STACK_SIZE 0x600 -#define TASK_LOOP_NUM 0x10000000 #define TEST_TIME 10 #define THREAD_COUNT_MIN 3 #define THREAD_COUNT_MAX 30 diff --git a/testsuites/unittest/posix/src/stdlib/strtoull_test.c b/testsuites/unittest/posix/src/stdlib/strtoull_test.c index 7c545b61e5e4b56b0b216cf90d3fce3ff2bdc6c8..4555297fee8b5e207e2d9d13cee69ab3d60701c1 100644 --- a/testsuites/unittest/posix/src/stdlib/strtoull_test.c +++ b/testsuites/unittest/posix/src/stdlib/strtoull_test.c @@ -48,25 +48,6 @@ */ LITE_TEST_SUIT(Posix, Posixtimer, PosixStdlibStrtoullTest); -/* * - * @tc.setup : setup for all testcases - * @return : setup result, TRUE is success, FALSE is fail - */ -static BOOL PosixStdlibStrtoullTestSetUp(void) -{ - return TRUE; -} - -/* * - * @tc.teardown : teardown for all testcases - * @return : teardown result, TRUE is success, FALSE is fail - */ -static BOOL PosixStdlibStrtoullTestTearDown(void) -{ - LOG("+-------------------------------------------+\n"); - return TRUE; -} - /* * * @tc.number : TEST_STDLIB_STRTOULL_001 * @tc.name : convert string by Strtoull diff --git a/testsuites/unittest/posix/src/string/memory_func_test.c b/testsuites/unittest/posix/src/string/memory_func_test.c index 81f1bb62da0dbd46bb895ad0a6bf6d7df0c88d47..36f5d33a055d417915be3dea96b1a83d87d73dc2 100644 --- a/testsuites/unittest/posix/src/string/memory_func_test.c +++ b/testsuites/unittest/posix/src/string/memory_func_test.c @@ -45,26 +45,6 @@ */ LITE_TEST_SUIT(Posix, PosixMemory, PosixMemFuncTestSuite); - -/* * - * @tc.setup : setup for all testcases - * @return : setup result, TRUE is success, FALSE is fail - */ -static BOOL PosixMemFuncTestSuiteSetUp(void) -{ - return TRUE; -} - -/* * - * @tc.teardown : teardown for all testcases - * @return : teardown result, TRUE is success, FALSE is fail - */ -static BOOL PosixMemFuncTestSuiteTearDown(void) -{ - printf("+Hello this is a memory function test+\n"); - return TRUE; -} - /* * * @tc.number : SUB_KERNEL_POSIX_MEMCPY_OPERATION_001 * @tc.name : Memony operation for memcpy test diff --git a/testsuites/unittest/posix/src/string/strchr_test.c b/testsuites/unittest/posix/src/string/strchr_test.c index f5a95eff207209facb6d2e4e973ea196ce6dec2d..071e3d8e7d2be7f4474d47dfde9a3d30142fd8a4 100644 --- a/testsuites/unittest/posix/src/string/strchr_test.c +++ b/testsuites/unittest/posix/src/string/strchr_test.c @@ -46,25 +46,6 @@ */ LITE_TEST_SUIT(Posix, Posixtimer, PosixStringStrchrTest); -/* * - * @tc.setup : setup for all testcases - * @return : setup result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringStrchrTestSetUp(void) -{ - return TRUE; -} - -/* * - * @tc.teardown : teardown for all testcases - * @return : teardown result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringStrchrTestTearDown(void) -{ - LOG("+-------------------------------------------+\n"); - return TRUE; -} - /* * * @tc.number : TEST_STRING_STRCHR_001 * @tc.name : find the first occurrence of a character in a string diff --git a/testsuites/unittest/posix/src/string/string_func_test_01.c b/testsuites/unittest/posix/src/string/string_func_test_01.c index e9ec2f706aabf1d27980543d794c25c1fe8240e9..0b4641b6dab5ff7d9b6bafe51a575ec75a67da04 100644 --- a/testsuites/unittest/posix/src/string/string_func_test_01.c +++ b/testsuites/unittest/posix/src/string/string_func_test_01.c @@ -46,25 +46,6 @@ */ LITE_TEST_SUIT(Posix, Posixtimer, PosixStringFuncTestSuite); -/* * - * @tc.setup : setup for all testcases - * @return : setup result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringFuncTestSuiteSetUp(void) -{ - return TRUE; -} - -/* * - * @tc.teardown : teardown for all testcases - * @return : teardown result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringFuncTestSuiteTearDown(void) -{ - printf("==== [ String TEST ] ====\n\n"); - return TRUE; -} - /* * * @tc.number TEST_STRING_STRLEN_001 * @tc.name string_strlen error test with not exist pid diff --git a/testsuites/unittest/posix/src/string/string_func_test_02.c b/testsuites/unittest/posix/src/string/string_func_test_02.c index 31800f3b7ecdc01c64b390444925d45c70c3ad71..0a036656e280af011b99feff240da14196e69762 100644 --- a/testsuites/unittest/posix/src/string/string_func_test_02.c +++ b/testsuites/unittest/posix/src/string/string_func_test_02.c @@ -48,30 +48,6 @@ */ LITE_TEST_SUIT(Posix, PosixStrings, PosixStringsFuncTestSuite); -/* * - * @tc.setup : setup for all testcases - * @return : setup result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringsFuncTestSuiteSetUp(void) -{ - LOG("+-------------------------------------------+\n"); - LOG("+------PosixStringsFuncTestSuiteSetUp-------+\n"); - LOG("+-------------------------------------------+\n"); - return TRUE; -} - -/* * - * @tc.teardown : teardown for all testcases - * @return : teardown result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringsFuncTestSuiteTearDown(void) -{ - LOG("+-------------------------------------------+\n"); - LOG("+-----PosixStringsFuncTestSuiteTearDown-----+\n"); - LOG("+-------------------------------------------+\n"); - return TRUE; -} - /* * * @tc.number SUB_KERNEL_IO_STRINGS_0100 * @tc.name strcasecmp basic function test diff --git a/testsuites/unittest/posix/src/string/strstr_test.c b/testsuites/unittest/posix/src/string/strstr_test.c index ddc52e22dafd69106f2892fa074c9c90a7ec38b7..9579ea91214860af7751d354ecf8aff3329720ff 100644 --- a/testsuites/unittest/posix/src/string/strstr_test.c +++ b/testsuites/unittest/posix/src/string/strstr_test.c @@ -45,25 +45,6 @@ */ LITE_TEST_SUIT(Posix, Posixtimer, PosixStringStrStrTest); -/* * - * @tc.setup : setup for all testcases - * @return : setup result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringStrStrTestSetUp(void) -{ - return TRUE; -} - -/* * - * @tc.teardown : teardown for all testcases - * @return : teardown result, TRUE is success, FALSE is fail - */ -static BOOL PosixStringStrStrTestTearDown(void) -{ - LOG("+-------------------------------------------+\n"); - return TRUE; -} - /* * * @tc.number : TEST_STRING_STRSTR_001 * @tc.name : find the first occurrence of sub-string in a string