!95 TDD测试用例

Merge pull request !95 from HaixiangW/myfeature
This commit is contained in:
openharmony_ci 2021-09-13 07:06:35 +00:00 committed by Gitee
commit f827c252c4
2 changed files with 8 additions and 7 deletions

View File

@ -211,9 +211,9 @@ if (ohos_kernel_type == "liteos_m") {
"//third_party/bounds_checking_function:libsec_shared", "//third_party/bounds_checking_function:libsec_shared",
] ]
} }
#if (ohos_build_type == "debug") { if (ohos_build_type == "debug") {
# group("huks_new_test") { group("huks_new_test") {
# deps = [ "//base/security/huks/test:huks_new_test" ] deps = [ "//base/security/huks/test:huks_new_test" ]
# } }
#} }
} }

View File

@ -145,12 +145,13 @@ static int32_t FileWrite(const char *fileName, uint32_t offset, const uint8_t *b
} }
int32_t size = write(fd, buf, len); int32_t size = write(fd, buf, len);
close(fd);
if (size < 0) { if (size < 0) {
HKS_LOG_E("write file size failed, errno = 0x%x", errno); HKS_LOG_E("write file size failed, errno = 0x%x", errno);
close(fd);
return HKS_ERROR_WRITE_FILE_FAIL; return HKS_ERROR_WRITE_FILE_FAIL;
} }
fsync(fd);
close(fd);
return HKS_SUCCESS; return HKS_SUCCESS;
} }