From 5c168fc3e0d08dd4a8924696e17a498eb444fa70 Mon Sep 17 00:00:00 2001 From: zhushengle Date: Mon, 27 Sep 2021 20:06:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0L0=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=97=A8=E7=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #I4C5R4 Signed-off-by: zhushengle Change-Id: I2900175e2507027d61e8fb47277a940250bea8b5 --- testsuits/sample/kernel/task/It_los_task_092.c | 2 +- testsuits/sample/kernel/task/It_los_task_103.c | 4 ++-- testsuits/src/osTest.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/testsuits/sample/kernel/task/It_los_task_092.c b/testsuits/sample/kernel/task/It_los_task_092.c index 4ab0b14f..65e5f3fa 100644 --- a/testsuits/sample/kernel/task/It_los_task_092.c +++ b/testsuits/sample/kernel/task/It_los_task_092.c @@ -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; diff --git a/testsuits/sample/kernel/task/It_los_task_103.c b/testsuits/sample/kernel/task/It_los_task_103.c index 7ff4c3df..96b9567d 100644 --- a/testsuits/sample/kernel/task/It_los_task_103.c +++ b/testsuits/sample/kernel/task/It_los_task_103.c @@ -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); diff --git a/testsuits/src/osTest.c b/testsuits/src/osTest.c index 2b442c08..cae0c9a4 100644 --- a/testsuits/src/osTest.c +++ b/testsuits/src/osTest.c @@ -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)