diff --git a/services/updater_main.cpp b/services/updater_main.cpp index 8abf00a4bfa38394fb81f820ed752aa438d9238d..5f354fedfccee4438c6b8e21fff30d51ccf71e51 100644 --- a/services/updater_main.cpp +++ b/services/updater_main.cpp @@ -488,6 +488,11 @@ UpdaterStatus DoUpdatePackages(UpdaterParams &upParams) return status; } +__attribute__((weak)) const char* GetBlockVerifyRes() +{ + return ""; +} + static void PostUpdatePackages(UpdaterParams &upParams, bool updateResult) { std::string writeBuffer; @@ -521,6 +526,8 @@ static void PostUpdatePackages(UpdaterParams &upParams, bool updateResult) if (writeBuffer != "") { writeBuffer.pop_back(); } + std::string blockVerifyRes = GetBlockVerifyRes(); + writeBuffer = blockVerifyRes + writeBuffer; LOG(INFO) << "post over, writeBuffer = " << writeBuffer; WriteDumpResult(writeBuffer, UPDATER_RESULT_FILE); DeleteInstallTimeFile(); diff --git a/services/updater_main.h b/services/updater_main.h index 699df7ee794b417234a1b392cf3effdcabb0332d..c9219ec7585bf7a2bd7ba7dd9e359842a6c799c9 100644 --- a/services/updater_main.h +++ b/services/updater_main.h @@ -70,6 +70,7 @@ int32_t VerifySpecialPkgs([[maybe_unused]]UpdaterParams &upParams); void UpdaterVerifyFailEntry(bool verifyret); bool IsSpareBoardBoot(void); bool IsNeedWipe(); +const char* GetBlockVerifyRes(); #ifdef __cplusplus #if __cplusplus } diff --git a/test/unittest/package/pkg_manager_unittest.cpp b/test/unittest/package/pkg_manager_unittest.cpp index 761559694b5cce2687560db62006e992d604ed58..1fcc53d249126952369b98cda373e02fc4bba0bb 100755 --- a/test/unittest/package/pkg_manager_unittest.cpp +++ b/test/unittest/package/pkg_manager_unittest.cpp @@ -643,7 +643,7 @@ HWTEST_F(PkgMangerTest, TestLz4Buffer, TestSize.Level1) EXPECT_EQ(0, test.TestDecompressLz4(lz4Info, uncompressedData, digest)); int32_t ret = 0; for (int32_t i = 0; i < LZ4F_MAX_BLOCKID; i++) { - lz4Info.compressionLevel = 2; + lz4Info.compressionLevel = 1; lz4Info.blockSizeID = i; ret = test.TestCompressBuffer(lz4Info.fileInfo, uncompressedData, digest); if (ret == 0) {