未验证 提交 bcd1366b 编写于 作者: O openharmony_ci 提交者: Gitee

!3740 【OpenHarmony开源贡献者计划2022】fix build warnings for suite 'ActsHuksHalFunctionTest'

Merge pull request !3740 from c01dface/dev1
...@@ -47,6 +47,7 @@ LITE_TEST_SUIT(security, securityData, HksExistTest); ...@@ -47,6 +47,7 @@ LITE_TEST_SUIT(security, securityData, HksExistTest);
static void ExecHksInitialize(void const *argument) static void ExecHksInitialize(void const *argument)
{ {
(void)argument;
LiteTestPrint("HksInitialize Begin!\n"); LiteTestPrint("HksInitialize Begin!\n");
TEST_ASSERT_TRUE(HksInitialize() == 0); TEST_ASSERT_TRUE(HksInitialize() == 0);
LiteTestPrint("HksInitialize End!\n"); LiteTestPrint("HksInitialize End!\n");
...@@ -55,6 +56,7 @@ static void ExecHksInitialize(void const *argument) ...@@ -55,6 +56,7 @@ static void ExecHksInitialize(void const *argument)
static void ExecHksExistTest001(void const *argument) static void ExecHksExistTest001(void const *argument)
{ {
(void)argument;
int32_t ret; int32_t ret;
LiteTestPrint("HksExistTest001 Begin!\n"); LiteTestPrint("HksExistTest001 Begin!\n");
struct HksBlob *keyAlias = NULL; struct HksBlob *keyAlias = NULL;
...@@ -86,7 +88,7 @@ static void ExecHksExistTest001(void const *argument) ...@@ -86,7 +88,7 @@ static void ExecHksExistTest001(void const *argument)
* @tc.setup: define a setup for test suit, format:"CalcMultiTest + SetUp" * @tc.setup: define a setup for test suit, format:"CalcMultiTest + SetUp"
* @return: true——setup success * @return: true——setup success
*/ */
static BOOL HksExistTestSetUp() static BOOL HksExistTestSetUp(void)
{ {
LiteTestPrint("setup\n"); LiteTestPrint("setup\n");
IoTWatchDogDisable(); IoTWatchDogDisable();
...@@ -101,7 +103,10 @@ static BOOL HksExistTestSetUp() ...@@ -101,7 +103,10 @@ static BOOL HksExistTestSetUp()
attr.stack_size = TEST_TASK_STACK_SIZE; attr.stack_size = TEST_TASK_STACK_SIZE;
attr.priority = g_setPriority; attr.priority = g_setPriority;
id = osThreadNew((osThreadFunc_t)ExecHksInitialize, NULL, &attr); id = osThreadNew((osThreadFunc_t)ExecHksInitialize, NULL, &attr);
sleep(WAIT_TO_TEST_DONE); if (id == NULL) {
printf("Failed to create thread ExecHksInitialize!\n");
}
osDelay(WAIT_TO_TEST_DONE);
LiteTestPrint("HksGenerateKeyTestSetUp End2!\n"); LiteTestPrint("HksGenerateKeyTestSetUp End2!\n");
return TRUE; return TRUE;
} }
...@@ -110,7 +115,7 @@ static BOOL HksExistTestSetUp() ...@@ -110,7 +115,7 @@ static BOOL HksExistTestSetUp()
* @tc.teardown: define a setup for test suit, format:"CalcMultiTest + TearDown" * @tc.teardown: define a setup for test suit, format:"CalcMultiTest + TearDown"
* @return: true——teardown success * @return: true——teardown success
*/ */
static BOOL HksExistTestTearDown() static BOOL HksExistTestTearDown(void)
{ {
LiteTestPrint("tearDown\n"); LiteTestPrint("tearDown\n");
IoTWatchDogEnable(); IoTWatchDogEnable();
...@@ -135,7 +140,10 @@ LITE_TEST_CASE(HksExistTest, HksExistTest001, Level1) ...@@ -135,7 +140,10 @@ LITE_TEST_CASE(HksExistTest, HksExistTest001, Level1)
attr.stack_size = TEST_TASK_STACK_SIZE; attr.stack_size = TEST_TASK_STACK_SIZE;
attr.priority = g_setPriority; attr.priority = g_setPriority;
id = osThreadNew((osThreadFunc_t)ExecHksExistTest001, NULL, &attr); id = osThreadNew((osThreadFunc_t)ExecHksExistTest001, NULL, &attr);
sleep(WAIT_TO_TEST_DONE); if (id == NULL) {
printf("Failed to create thread ExecHksExistTest001!\n");
}
osDelay(WAIT_TO_TEST_DONE);
LiteTestPrint("HksExistTest001 End2!\n"); LiteTestPrint("HksExistTest001 End2!\n");
} }
RUN_TEST_SUITE(HksExistTest); RUN_TEST_SUITE(HksExistTest);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册