!330 feat: 添加L0测试门禁

Merge pull request !330 from zhushengle/test
This commit is contained in:
openharmony_ci 2021-09-28 02:18:08 +00:00 committed by Gitee
commit 8dfcf71288
3 changed files with 6 additions and 5 deletions

View File

@ -45,7 +45,7 @@ static UINT32 TestCase(VOID)
UINT32 ret;
TSK_INIT_PARAM_S task1 = { 0 };
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF01;
task1.uwStackSize = 0x423; // Set reasonable stack space.
task1.uwStackSize = LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE + 0x23; // 0x23: Set reasonable stack space.
task1.pcName = "Tsk092A";
task1.usTaskPrio = TASK_PRIO_TEST - 1;
task1.uwResved = 0;

View File

@ -50,7 +50,7 @@ static VOID TaskF01(VOID)
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF02;
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk103B";
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, set new task priority, it is higher than the current task.
task1.usTaskPrio = TASK_PRIO_TEST - 1; // 1, set new task priority, it is higher than the current task.
task1.uwResved = LOS_TASK_STATUS_DETACHED;
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@ -59,7 +59,7 @@ static VOID TaskF01(VOID)
ret = LOS_TaskPriGet(g_testTaskID02);
// 2, Assert this result is consistent with the priority that has been set.
ICUNIT_ASSERT_EQUAL_VOID(ret, TASK_PRIO_TEST - 2, ret);
ICUNIT_ASSERT_EQUAL_VOID(ret, TASK_PRIO_TEST - 1, ret);
ret = LOS_TaskPriGet(g_testTaskID01);

View File

@ -177,8 +177,9 @@ VOID TestTaskEntry()
TestCmsis2();
#endif
PRINTF("\t\n --- Test End --- \n");
PRINTF("\nfailed count : %d, success count:%d\n", g_failResult, g_passResult);
/* The log is used for testing entrance guard, please do not make any changes. */
PRINTF("\nfailed count:%d, success count:%d\n", g_failResult, g_passResult);
PRINTF("--- Test End ---\n");
}
UINT32 los_TestInit(VOID)