mirror of
https://gitee.com/openharmony/security_device_security_level
synced 2024-11-23 14:50:00 +00:00
fix: UT testcase issues
Signed-off-by: wenkaisong <songwenkai1@huawei.com>
This commit is contained in:
parent
1b06e4e2b7
commit
1cb58a3825
@ -31,7 +31,7 @@ static int DslmIpcCallback(IOwner owner, int code, IpcIo *reply)
|
||||
return ERR_INVALID_PARA;
|
||||
}
|
||||
|
||||
uint32_t cookie, result, level;
|
||||
uint32_t result, level;
|
||||
struct DslmCallbackHolder *holder = (struct DslmCallbackHolder *)owner;
|
||||
|
||||
ReadUint32(reply, &result);
|
||||
|
@ -1519,12 +1519,16 @@ HWTEST_F(DslmTest, DestroyDslmCred_case1, TestSize.Level0)
|
||||
*/
|
||||
HWTEST_F(DslmTest, ReportHiEventAppInvoke_case1, TestSize.Level0)
|
||||
{
|
||||
DslmDeviceInfo info;
|
||||
(void)memset_s(&info, sizeof(DslmDeviceInfo), 0, sizeof(DslmDeviceInfo));
|
||||
info.lastRequestTime = 10U;
|
||||
DslmDeviceInfo *info = (DslmDeviceInfo *)MALLOC(sizeof(DslmDeviceInfo));
|
||||
ASSERT_NE(nullptr, info);
|
||||
(void)memset_s(info, sizeof(DslmDeviceInfo), 0, sizeof(DslmDeviceInfo));
|
||||
info->lastRequestTime = 10U;
|
||||
ReportHiEventInfoSync(nullptr);
|
||||
ReportHiEventInfoSync(&info);
|
||||
ReportHiEventInfoSync(info);
|
||||
ReportHiEventAppInvoke(nullptr);
|
||||
EXPECT_NE(nullptr, info);
|
||||
FREE(info);
|
||||
info = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user