From 4d60193495ba6b8dfac6c68ef3dfa061fe089401 Mon Sep 17 00:00:00 2001 From: zph Date: Fri, 27 Jun 2025 15:17:27 +0800 Subject: [PATCH] update Signed-off-by: zph --- .../distributeddataservice/service/test/BUILD.gn | 6 ++++++ .../service/test/udmf_run_time_store_test.cpp | 13 ------------- .../service/udmf/store/runtime_store.cpp | 5 ----- .../service/udmf/store/runtime_store.h | 1 - .../service/udmf/store/store.h | 1 - 5 files changed, 6 insertions(+), 20 deletions(-) diff --git a/services/distributeddataservice/service/test/BUILD.gn b/services/distributeddataservice/service/test/BUILD.gn index 710d0bcee..82dd9cbaa 100644 --- a/services/distributeddataservice/service/test/BUILD.gn +++ b/services/distributeddataservice/service/test/BUILD.gn @@ -1146,6 +1146,12 @@ ohos_unittest("DumpHelperTest") { ohos_unittest("UdmfServiceImplTest") { module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "${datamgr_service_path}/cfi_blocklist.txt" + } sources = [ "${data_service_path}/framework/feature/feature_system.cpp", "${data_service_path}/app/src/kvstore_meta_manager.cpp", diff --git a/services/distributeddataservice/service/test/udmf_run_time_store_test.cpp b/services/distributeddataservice/service/test/udmf_run_time_store_test.cpp index 4dbf15f48..ff55cf3f5 100644 --- a/services/distributeddataservice/service/test/udmf_run_time_store_test.cpp +++ b/services/distributeddataservice/service/test/udmf_run_time_store_test.cpp @@ -633,19 +633,6 @@ HWTEST_F(UdmfRunTimeStoreTest, Clear01, TestSize.Level1) EXPECT_EQ(ret, store->Delete(DATA_PREFIX)); } -/** -* @tc.name: Close01 -* @tc.desc: check for legal parameters, delete entries error. -* @tc.type: FUNC -* @tc.require: -*/ -HWTEST_F(UdmfRunTimeStoreTest, Close01, TestSize.Level1) -{ - auto store = std::make_shared(STORE_ID); - EXPECT_NO_FATAL_FAILURE(store->Close()); -} - - /** * @tc.name: GetSummary * @tc.desc: check for legal parameters, delete entries error. diff --git a/services/distributeddataservice/service/udmf/store/runtime_store.cpp b/services/distributeddataservice/service/udmf/store/runtime_store.cpp index 03705eeca..62fbbb3c3 100644 --- a/services/distributeddataservice/service/udmf/store/runtime_store.cpp +++ b/services/distributeddataservice/service/udmf/store/runtime_store.cpp @@ -407,11 +407,6 @@ Status RuntimeStore::GetBatchData(const std::string &dataPrefix, std::vectorCloseKvStore(kvStore_.get()); -} - bool RuntimeStore::Init() { if (!SaveMetaData()) { // get keyinfo about create db fail. diff --git a/services/distributeddataservice/service/udmf/store/runtime_store.h b/services/distributeddataservice/service/udmf/store/runtime_store.h index ef9c37e36..d5f4be1a8 100644 --- a/services/distributeddataservice/service/udmf/store/runtime_store.h +++ b/services/distributeddataservice/service/udmf/store/runtime_store.h @@ -44,7 +44,6 @@ public: Status PutRuntime(const std::string &key, const Runtime &runtime) override; Status GetRuntime(const std::string &key, Runtime &runtime) override; Status PutSummary(UnifiedKey &key, const Summary &summary) override; - void Close() override; bool Init() override; private: diff --git a/services/distributeddataservice/service/udmf/store/store.h b/services/distributeddataservice/service/udmf/store/store.h index 69091ed91..1b215e250 100644 --- a/services/distributeddataservice/service/udmf/store/store.h +++ b/services/distributeddataservice/service/udmf/store/store.h @@ -41,7 +41,6 @@ public: virtual Status GetRuntime(const std::string &key, Runtime &runtime) = 0; virtual Status PutSummary(UnifiedKey &key, const Summary &summary) = 0; virtual bool Init() = 0; - virtual void Close() = 0; bool operator<(const Time &time) const { -- Gitee