fix: kora工具检视问题修复
【背景】kora工具检视问题修复 【修改方案】 1,对部分代码问题进行整改 【影响】 对现有的产品编译不会有影响。 Signed-off-by: wangchen <wangchen64@huawei.com> Change-Id: Iafc58b7c71e5d139e11a0ae9d98ca5a57fc6549f
This commit is contained in:
@@ -60,6 +60,8 @@ static UINT32 Testcase(VOID)
|
||||
fclose(testFile);
|
||||
|
||||
testFile = fopen(pathname, "r");
|
||||
ICUNIT_GOTO_NOT_EQUAL(testFile, NULL, testFile, EXIT);
|
||||
|
||||
p = fgetws(tarStr, 16, testFile); // 16, read size,total write and '\0'
|
||||
nRet = wcscmp(L"hello world 666", tarStr);
|
||||
ICUNIT_GOTO_EQUAL(nRet, 0, nRet, EXIT);
|
||||
|
||||
@@ -55,6 +55,10 @@ static UINT32 testcase(VOID)
|
||||
}
|
||||
|
||||
mnt_new = (struct mntent *)malloc(sizeof(struct mntent));
|
||||
if (mnt_new == NULL) {
|
||||
(VOID)RecoveryFileEnv(pathList, 1);
|
||||
return LOS_NOK;
|
||||
}
|
||||
mnt_new->mnt_fsname = "UUID=c4992556-a86e-45e8-ba5f-190b16a9073x";
|
||||
mnt_new->mnt_dir = "/usr1";
|
||||
mnt_new->mnt_type = "ext3";
|
||||
|
||||
@@ -55,6 +55,8 @@ static UINT32 Testcase(VOID)
|
||||
fclose(putwcFile);
|
||||
|
||||
putwcFile = fopen(pathname, "r");
|
||||
ICUNIT_GOTO_NOT_EQUAL(putwcFile, NULL, putwcFile, EXIT);
|
||||
|
||||
tarWc = getwc(putwcFile);
|
||||
ICUNIT_GOTO_EQUAL(tarWc, L'H', tarWc, EXIT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user