fix: 内源检视测试用例问题修复
Signed-off-by: zhushengle <zhushengle@huawei.com> Change-Id: I605bf04f3afe92d621aea6410bbdc3bea44c601b
This commit is contained in:
parent
cdcf600571
commit
a6ac7597f8
|
@ -82,7 +82,7 @@ static UINT32 Testcase(void)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -109,7 +109,7 @@ static UINT32 Testcase(void)
|
||||||
LOS_TaskDelay(1);
|
LOS_TaskDelay(1);
|
||||||
PRINTK("sent %u time\n", g_ipiTriggerTimes);
|
PRINTK("sent %u time\n", g_ipiTriggerTimes);
|
||||||
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
|
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
|
||||||
PRINTK(" cpu%d recieved %u times\n", i, g_ipiRecieveTimes[i]);
|
PRINTK(" cpu%d received %u times\n", i, g_ipiRecieveTimes[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * (j + 1), g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * (j + 1), g_testCount, EXIT);
|
||||||
|
|
|
@ -66,8 +66,8 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
ret = LOS_TaskDelay(12); // 12, set delay time
|
ret = LOS_TaskDelay(12); // 12, set delay time
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
if (g_testCount < 10) { // 10, if g_testCount < 10 set a erro code, then exit
|
if (g_testCount < 10) { // 10, if g_testCount < 10 set an erro code, then exit
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 10, g_testCount, EXIT); // 10, if g_testCount < 10 set a erro code, then exit
|
ICUNIT_GOTO_EQUAL(g_testCount, 10, g_testCount, EXIT); // 10, if g_testCount < 10 set an erro code, then exit
|
||||||
}
|
}
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -63,7 +63,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
ret = LOS_SwtmrTimeGet(swTmrID, &tick);
|
ret = LOS_SwtmrTimeGet(swTmrID, &tick);
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
if (tick > 4) { // 4, if tick > 4, set a erro code, then exit
|
if (tick > 4) { // 4, if tick > 4, set an erro code, then exit
|
||||||
ICUNIT_GOTO_EQUAL(1, 0, tick, EXIT);
|
ICUNIT_GOTO_EQUAL(1, 0, tick, EXIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* Wait TaskF01 to start */
|
/* Wait TaskF01 to start */
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
ret = OS_TCB_FROM_TID(testid)->taskStatus;
|
ret = OS_TCB_FROM_TID(testid)->taskStatus;
|
||||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* Wait TaskF1 to start */
|
/* Wait TaskF1 to start */
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
||||||
|
|
||||||
/* lower down the priority of TaskF01 to trigger preeption */
|
/* lower down the priority of TaskF01 to trigger preeption */
|
||||||
|
|
|
@ -63,7 +63,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for task to yeild */
|
/* wait for task to yield */
|
||||||
TestBusyTaskDelay(LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT * 2); // 2, used to calculate delay time
|
TestBusyTaskDelay(LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT * 2); // 2, used to calculate delay time
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM, g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM, g_testCount, EXIT);
|
||||||
|
|
|
@ -66,7 +66,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* Wait TaskF01 to start */
|
/* Wait TaskF01 to start */
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, assert that g_testCount is equal to this.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, assert that g_testCount is equal to this.
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
|
|
||||||
/* Wait TaskF01 to start */
|
/* Wait TaskF01 to start */
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* wait for other core's task being schduled */
|
/* wait for other core's task being schduled */
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
ret = OS_TCB_FROM_TID(g_testTaskID01)->taskStatus;
|
ret = OS_TCB_FROM_TID(g_testTaskID01)->taskStatus;
|
||||||
|
|
|
@ -83,7 +83,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
|
|
||||||
/* wait for other core's task being scheduled */
|
/* wait for other core's task being scheduled */
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
|
|
||||||
/* wait for other core's task executed */
|
/* wait for other core's task executed */
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(4); // 4, set delay time
|
TestBusyTaskDelay(4); // 4, set delay time
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 5); // 100, Set the timeout of runtime; 5, test runing count
|
TestAssertBusyTaskDelay(100, 5); // 100, Set the timeout of runtime; 5, test running count
|
||||||
|
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 5, g_testCount); // 5, assert that g_testCount is equal to this.
|
ICUNIT_ASSERT_EQUAL(g_testCount, 5, g_testCount); // 5, assert that g_testCount is equal to this.
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); // 2, assert that g_testCount is equal to this.
|
ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); // 2, assert that g_testCount is equal to this.
|
||||||
|
|
|
@ -81,7 +81,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
|
|
||||||
/* Wait other core's TaskF01 to resume */
|
/* Wait other core's TaskF01 to resume */
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ static UINT32 Testcase(void)
|
||||||
/* unlock other core's tasklock */
|
/* unlock other core's tasklock */
|
||||||
g_flag = 1;
|
g_flag = 1;
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* wait for other core's task to suspend */
|
/* wait for other core's task to suspend */
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* wait for other core's task being running */
|
/* wait for other core's task being running */
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
TestBusyTaskDelay(10); // 10, set delay time
|
TestBusyTaskDelay(10); // 10, set delay time
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, assert that g_testCount is equal to this.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, assert that g_testCount is equal to this.
|
||||||
|
|
|
@ -68,7 +68,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
// 2, set delay time.
|
// 2, set delay time.
|
||||||
TestBusyTaskDelay(2);
|
TestBusyTaskDelay(2);
|
||||||
|
|
|
@ -93,7 +93,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskYield();
|
ret = LOS_TaskYield();
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, assert that g_testCount is equal to this.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, assert that g_testCount is equal to this.
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ static UINT32 Testcase(void)
|
||||||
ret = OS_TCB_FROM_TID(g_testTaskID02)->taskStatus;
|
ret = OS_TCB_FROM_TID(g_testTaskID02)->taskStatus;
|
||||||
ICUNIT_ASSERT_NOT_EQUAL((ret & OS_TASK_STATUS_READY), 0, ret);
|
ICUNIT_ASSERT_NOT_EQUAL((ret & OS_TASK_STATUS_READY), 0, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
ICUNIT_ASSERT_NOT_EQUAL(g_testCount, 0, g_testCount);
|
ICUNIT_ASSERT_NOT_EQUAL(g_testCount, 0, g_testCount);
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
||||||
LOS_TaskUnlock();
|
LOS_TaskUnlock();
|
||||||
|
|
||||||
/* wait for TaskF01 is finished */
|
/* wait for TaskF01 is finished */
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(5); // 5, set delay time
|
TestBusyTaskDelay(5); // 5, set delay time
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // 3, assert that g_testCount is equal to this.
|
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // 3, assert that g_testCount is equal to this.
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
TestBusyTaskDelay(2); // 2, set delay time
|
TestBusyTaskDelay(2); // 2, set delay time
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskResume(g_testTaskID01);
|
ret = LOS_TaskResume(g_testTaskID01);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // 3, assert that g_testCount is equal to this.
|
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // 3, assert that g_testCount is equal to this.
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
LOS_AtomicInc(&g_testCount);
|
LOS_AtomicInc(&g_testCount);
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ static UINT32 Testcase(void)
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
/* wait for task02 start */
|
/* wait for task02 start */
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
for (j = 0; j < TRandom() % 200; j++) { // 200, Number of cycles.
|
for (j = 0; j < TRandom() % 200; j++) { // 200, Number of cycles.
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(void)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test runing count
|
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime; 1, test running count
|
||||||
|
|
||||||
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
g_testCount++;
|
g_testCount++;
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
EXIT:
|
EXIT:
|
||||||
LOS_TaskDelete(g_testTaskID01);
|
LOS_TaskDelete(g_testTaskID01);
|
||||||
|
|
|
@ -86,7 +86,7 @@ static UINT32 Testcase(VOID)
|
||||||
LOS_EventWrite(&g_event, 0x1111);
|
LOS_EventWrite(&g_event, 0x1111);
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test runing count
|
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT1); // 4, Here, assert that g_testCount is equal to 4.
|
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT1); // 4, Here, assert that g_testCount is equal to 4.
|
||||||
|
|
||||||
EXIT1:
|
EXIT1:
|
||||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
tickNum = (osEndTime - osStartTime) * LOSCFG_BASE_CORE_TICK_PER_SECOND / OS_SYS_CLOCK;
|
tickNum = (osEndTime - osStartTime) * LOSCFG_BASE_CORE_TICK_PER_SECOND / OS_SYS_CLOCK;
|
||||||
|
|
||||||
if (tickNum < (10 - 2) && tickNum > (10 + 2)) { // when tick num in 10 - 2 or 10 + 2 interval
|
if (tickNum < (10 - 2) || tickNum > (10 + 2)) { // when tick num in 10 - 2 or 10 + 2 interval
|
||||||
ICUNIT_ASSERT_EQUAL(tickNum, 0, tickNum);
|
ICUNIT_ASSERT_EQUAL(tickNum, 0, tickNum);
|
||||||
}
|
}
|
||||||
ret = LOS_EventClear(&g_event, 0);
|
ret = LOS_EventClear(&g_event, 0);
|
||||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -71,7 +71,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
LOS_HwiDelete(HWI_NUM_TEST, NULL);
|
LOS_HwiDelete(HWI_NUM_TEST, NULL);
|
||||||
|
|
|
@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
ret = LOS_EventDestroy(&g_event);
|
ret = LOS_EventDestroy(&g_event);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
|
@ -91,7 +91,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -99,7 +99,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
ret = LOS_EventDestroy(&g_event);
|
ret = LOS_EventDestroy(&g_event);
|
||||||
|
|
|
@ -86,7 +86,7 @@ static UINT32 Testcase(VOID)
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
ret = LOS_EventDestroy(&g_event);
|
ret = LOS_EventDestroy(&g_event);
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -93,7 +93,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -45,7 +45,7 @@ static VOID TaskF01(VOID)
|
||||||
LOS_AtomicInc(&g_testCount);
|
LOS_AtomicInc(&g_testCount);
|
||||||
ret = LOS_EventRead(&g_event, 0x11, LOS_WAITMODE_AND, LOS_WAIT_FOREVER);
|
ret = LOS_EventRead(&g_event, 0x11, LOS_WAITMODE_AND, LOS_WAIT_FOREVER);
|
||||||
/*
|
/*
|
||||||
* write event ---> read event ---> destory event [pass]
|
* write event ---> read event ---> destroy event [pass]
|
||||||
* write event ---> destroy event ---> read event [fail]
|
* write event ---> destroy event ---> read event [fail]
|
||||||
*/
|
*/
|
||||||
LOS_AtomicInc(&g_testCount);
|
LOS_AtomicInc(&g_testCount);
|
||||||
|
|
|
@ -111,7 +111,7 @@ static UINT32 Testcase(void)
|
||||||
} else if ((g_ret1 == 0x00) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) {
|
} else if ((g_ret1 == 0x00) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) {
|
||||||
/*
|
/*
|
||||||
* (g_ret1 == 0) && (g_ret2 == 0) && (uwRet3 == 0)
|
* (g_ret1 == 0) && (g_ret2 == 0) && (uwRet3 == 0)
|
||||||
* try read -->write event ---resume read---> destory event ---> read event [fail]
|
* try read -->write event ---resume read---> destroy event ---> read event [fail]
|
||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
ICUNIT_GOTO_EQUAL(1, 0, g_ret1, EXIT);
|
ICUNIT_GOTO_EQUAL(1, 0, g_ret1, EXIT);
|
||||||
|
|
|
@ -100,13 +100,13 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_EventWrite(&g_event, 0x11); // try to wake task f01
|
ret = LOS_EventWrite(&g_event, 0x11); // try to wake task f01
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
// 100, Set the timeout of runtime; 2, test runing count
|
// 100, Set the timeout of runtime; 2, test running count
|
||||||
TestAssertBusyTaskDelay(100, 2); // cause tasklock on other cpu ,so task f01 wake failed
|
TestAssertBusyTaskDelay(100, 2); // cause tasklock on other cpu ,so task f01 wake failed
|
||||||
|
|
||||||
LOS_AtomicInc(&g_testCount);
|
LOS_AtomicInc(&g_testCount);
|
||||||
|
|
||||||
g_runFlag = 0; // unlock the other cpu
|
g_runFlag = 0; // unlock the other cpu
|
||||||
// 100, Set the timeout of runtime; 4, test runing count
|
// 100, Set the timeout of runtime; 4, test running count
|
||||||
TestAssertBusyTaskDelay(100, 4); // not schedule in current cpu cause tasklock
|
TestAssertBusyTaskDelay(100, 4); // not schedule in current cpu cause tasklock
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
LOS_TaskDelay(2); // test task's prio be seted 22
|
LOS_TaskDelay(2); // test task's prio be set 22
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT);
|
||||||
|
|
||||||
LOS_TaskLock();
|
LOS_TaskLock();
|
||||||
|
|
|
@ -70,7 +70,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
|
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
ret = LOS_QueueDelete(g_testQueueID01);
|
ret = LOS_QueueDelete(g_testQueueID01);
|
||||||
|
|
|
@ -94,7 +94,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT);
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT);
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
ret = LOS_QueueDelete(g_testQueueID01);
|
ret = LOS_QueueDelete(g_testQueueID01);
|
||||||
|
|
|
@ -90,7 +90,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
ret = LOS_QueueDelete(g_testQueueID01);
|
ret = LOS_QueueDelete(g_testQueueID01);
|
||||||
|
|
|
@ -95,7 +95,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.;
|
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.;
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -96,7 +96,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -99,7 +99,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -75,7 +75,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
ret = LOS_QueueDelete(g_testQueueID01);
|
ret = LOS_QueueDelete(g_testQueueID01);
|
||||||
|
|
|
@ -90,7 +90,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
ret = LOS_QueueDelete(g_testQueueID01);
|
ret = LOS_QueueDelete(g_testQueueID01);
|
||||||
|
|
|
@ -92,7 +92,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -94,7 +94,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
EXIT:
|
EXIT:
|
||||||
LOS_TaskDelete(g_testTaskID01);
|
LOS_TaskDelete(g_testTaskID01);
|
||||||
|
|
|
@ -106,7 +106,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.
|
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT1); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT1); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.
|
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.
|
||||||
|
|
|
@ -103,7 +103,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
/* wait for task01 to pend sem */
|
/* wait for task01 to pend sem */
|
||||||
|
@ -129,7 +129,7 @@ static UINT32 Testcase(VOID)
|
||||||
g_runFlag = 0; // unlock the other cpu
|
g_runFlag = 0; // unlock the other cpu
|
||||||
|
|
||||||
PRINT_DEBUG("finally\n");
|
PRINT_DEBUG("finally\n");
|
||||||
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test runing count.
|
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to 4.
|
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to 4.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count.
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||||
|
|
||||||
/* wait for task01 to pend sem */
|
/* wait for task01 to pend sem */
|
||||||
|
@ -104,7 +104,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.
|
ret = LOS_QueueWrite(g_testQueueID01, &g_buff1, 8, LOS_WAIT_FOREVER); // 8, Write the setting size of queue buffer.
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count.
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count.
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to 3.
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -71,7 +71,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -85,7 +85,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
TestBusyTaskDelay(1);
|
TestBusyTaskDelay(1);
|
||||||
|
|
|
@ -92,7 +92,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
/* wait for task1 to pend sem */
|
/* wait for task1 to pend sem */
|
||||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(200, 2); // 200, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(200, 2); // 200, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert the result
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert the result
|
||||||
|
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
|
|
|
@ -95,7 +95,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(200, 2); // 200, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(200, 2); // 200, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
|
|
|
@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
|
|
|
@ -94,7 +94,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -90,7 +90,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -98,7 +98,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
|
|
|
@ -90,7 +90,7 @@ static UINT32 testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
|
|
|
@ -90,7 +90,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -85,7 +85,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -96,7 +96,7 @@ static UINT32 testcase(VOID)
|
||||||
|
|
||||||
TestHwiTrigger(HWI_NUM_TEST);
|
TestHwiTrigger(HWI_NUM_TEST);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -96,13 +96,13 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(100, 3); // 100, Set the timeout of runtime; 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
||||||
if ((g_ret1 + g_ret2 == 0xff) && (TestAbs(g_ret1, g_ret2) == 0xff))
|
if ((g_ret1 + g_ret2 == 0xff) && (TestAbs(g_ret1, g_ret2) == 0xff))
|
||||||
ICUNIT_GOTO_EQUAL(1, 1, g_ret1, EXIT);
|
ICUNIT_GOTO_EQUAL(1, 1, g_ret1, EXIT);
|
||||||
|
|
|
@ -114,7 +114,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_SemPost(g_semID); // sem post in task
|
ret = LOS_SemPost(g_semID); // sem post in task
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test runing count
|
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
|
|
|
@ -87,7 +87,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_SemDelete(g_semID);
|
ret = LOS_SemDelete(g_semID);
|
||||||
g_ret1 = ret;
|
g_ret1 = ret;
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
if (((g_ret1 == LOS_OK) && (g_ret2 != LOS_OK)) || ((g_ret2 == LOS_OK) && (g_ret1 != LOS_OK)))
|
if (((g_ret1 == LOS_OK) && (g_ret2 != LOS_OK)) || ((g_ret2 == LOS_OK) && (g_ret1 != LOS_OK)))
|
||||||
|
|
|
@ -101,7 +101,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_SemPost(g_semID); // post sem in other cpu
|
ret = LOS_SemPost(g_semID); // post sem in other cpu
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test runing count
|
TestAssertBusyTaskDelay(100, 4); // 100, Set the timeout of runtime; 4, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
if ((g_ret != LOS_OK) && (g_ret != LOS_ERRNO_SEM_PENDED)) {
|
if ((g_ret != LOS_OK) && (g_ret != LOS_ERRNO_SEM_PENDED)) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_SemPost(g_semID); // post sem before 10 ticks timeout
|
ret = LOS_SemPost(g_semID); // post sem before 10 ticks timeout
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, LOSCFG_KERNEL_CORE_NUM * 3); // 100, Set the timeout of runtime; LOSCFG_KERNEL_CORE_NUM * 3, test runing count
|
TestAssertBusyTaskDelay(100, LOSCFG_KERNEL_CORE_NUM * 3); // 100, Set the timeout of runtime; LOSCFG_KERNEL_CORE_NUM * 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * 3, g_testCount, EXIT); // 3, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
|
|
|
@ -103,7 +103,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(200, 3); // 200, Set the timeout of runtime; 3, test runing count
|
TestAssertBusyTaskDelay(200, 3); // 200, Set the timeout of runtime; 3, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT1); // 3, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT1); // 3, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
ret = LOS_SemPost(g_semID);
|
ret = LOS_SemPost(g_semID);
|
||||||
|
|
|
@ -101,7 +101,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||||
|
|
||||||
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
|
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test running count
|
||||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to
|
||||||
|
|
||||||
PRINT_DEBUG("sem post\n");
|
PRINT_DEBUG("sem post\n");
|
||||||
|
|
|
@ -44,7 +44,7 @@ static UINT32 Testcase(VOID)
|
||||||
prioceiling = sched_get_priority_max(SCHED_RR);
|
prioceiling = sched_get_priority_max(SCHED_RR);
|
||||||
prioceiling++;
|
prioceiling++;
|
||||||
|
|
||||||
/* Set the prioceiling of an unintialized mutex attr. */
|
/* Set the prioceiling of an uninitialized mutex attr. */
|
||||||
ret = pthread_mutexattr_setprioceiling(&mta, prioceiling);
|
ret = pthread_mutexattr_setprioceiling(&mta, prioceiling);
|
||||||
ICUNIT_GOTO_EQUAL(ret, EINVAL, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, EINVAL, ret, EXIT);
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
|
||||||
pthread_mutexattr_t mta;
|
pthread_mutexattr_t mta;
|
||||||
int prioceiling, ret;
|
int prioceiling, ret;
|
||||||
|
|
||||||
/* Set 'prioceiling' out of SCHED_FIFO boundry. */
|
/* Set 'prioceiling' out of SCHED_FIFO boundary. */
|
||||||
prioceiling = sched_get_priority_min(SCHED_RR);
|
prioceiling = sched_get_priority_min(SCHED_RR);
|
||||||
prioceiling--;
|
prioceiling--;
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ static UINT32 Testcase(VOID)
|
||||||
int prioceiling, ret;
|
int prioceiling, ret;
|
||||||
pthread_mutexattr_t mta;
|
pthread_mutexattr_t mta;
|
||||||
|
|
||||||
/* Get the prioceiling of an unintialized mutex attr. */
|
/* Get the prioceiling of an uninitialized mutex attr. */
|
||||||
ret = pthread_mutexattr_getprioceiling(&mta, &prioceiling);
|
ret = pthread_mutexattr_getprioceiling(&mta, &prioceiling);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, ENOERR, ret);
|
ICUNIT_ASSERT_EQUAL(ret, ENOERR, ret);
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ static UINT32 Testcase(VOID)
|
||||||
rc = pthread_mutexattr_getprioceiling(&mta, &prioceiling);
|
rc = pthread_mutexattr_getprioceiling(&mta, &prioceiling);
|
||||||
ICUNIT_GOTO_EQUAL(rc, ENOERR, rc, EXIT);
|
ICUNIT_GOTO_EQUAL(rc, ENOERR, rc, EXIT);
|
||||||
|
|
||||||
/* Make sure that prioceiling is withing the legal SCHED_FIFO boundries. */
|
/* Make sure that prioceiling is within the legal SCHED_FIFO boundries. */
|
||||||
if (prioceiling != i) {
|
if (prioceiling != i) {
|
||||||
rc = pthread_mutexattr_destroy(&mta);
|
rc = pthread_mutexattr_destroy(&mta);
|
||||||
ICUNIT_GOTO_EQUAL(rc, ENOERR, rc, EXIT);
|
ICUNIT_GOTO_EQUAL(rc, ENOERR, rc, EXIT);
|
||||||
|
@ -101,4 +101,4 @@ VOID ItPosixMux016(void)
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cpluscplus */
|
#endif /* __cpluscplus */
|
||||||
#endif /* __cpluscplus */
|
#endif /* __cpluscplus */
|
||||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
||||||
pthreadData = pthread_get_data(newTh);
|
pthreadData = pthread_get_data(newTh);
|
||||||
ICUNIT_ASSERT_EQUAL(pthreadData, NULL, pthreadData);
|
ICUNIT_ASSERT_EQUAL(pthreadData, NULL, pthreadData);
|
||||||
|
|
||||||
/* Detach the non-existant thread. */
|
/* Detach the non-existent thread. */
|
||||||
ret = pthread_detach(newTh);
|
ret = pthread_detach(newTh);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
|
ICUNIT_ASSERT_EQUAL(ret, ESRCH, ret);
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ iUINT32 ICunitRunF(ICUNIT_CASE_S *psubCase)
|
||||||
(strcmp(psubCase->pcCaseID, "IT_FS_FAT_363") == 0) || (strcmp(psubCase->pcCaseID, "LLT_FS_VFS_004") == 0) ||
|
(strcmp(psubCase->pcCaseID, "IT_FS_FAT_363") == 0) || (strcmp(psubCase->pcCaseID, "LLT_FS_VFS_004") == 0) ||
|
||||||
(strcmp(psubCase->pcCaseID, "LLT_FS_RAMFS_003") == 0) ||
|
(strcmp(psubCase->pcCaseID, "LLT_FS_RAMFS_003") == 0) ||
|
||||||
(strcmp(psubCase->pcCaseID, "LLT_FS_RAMFS_001") == 0)) {
|
(strcmp(psubCase->pcCaseID, "LLT_FS_RAMFS_001") == 0)) {
|
||||||
dprintf(" [Case]-%s-%s-%s-%s-%s,unruning!!!\n", psubCase->pcCaseID, g_strLayer[psubCase->testcase_layer],
|
dprintf(" [Case]-%s-%s-%s-%s-%s,unrunning!!!\n", psubCase->pcCaseID, g_strLayer[psubCase->testcase_layer],
|
||||||
g_strModule[psubCase->testcase_module], g_strLevel[psubCase->testcase_level],
|
g_strModule[psubCase->testcase_module], g_strLevel[psubCase->testcase_level],
|
||||||
g_strType[psubCase->testcase_type]);
|
g_strType[psubCase->testcase_type]);
|
||||||
goto ENDING;
|
goto ENDING;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue