From 8c29754baf1449dbff8417b9855d68e417e3067e Mon Sep 17 00:00:00 2001 From: wangbin Date: Fri, 27 Jun 2025 15:15:35 +0800 Subject: [PATCH 1/2] fix ut Signed-off-by: wangbin --- cfi_blocklist.txt | 3 ++- services/distributeddataservice/app/test/BUILD.gn | 1 + .../app/test/unittest/kvstore_data_service_test.cpp | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cfi_blocklist.txt b/cfi_blocklist.txt index 89d302fdc..569178d8c 100644 --- a/cfi_blocklist.txt +++ b/cfi_blocklist.txt @@ -13,4 +13,5 @@ [cfi] src:*third_party/googletest/googlemock/include/gmock/* -src:*third_party/googletest/googletest/include/gtest/* \ No newline at end of file +src:*third_party/googletest/googletest/include/gtest/* +src:*foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/test/* \ No newline at end of file diff --git a/services/distributeddataservice/app/test/BUILD.gn b/services/distributeddataservice/app/test/BUILD.gn index d5b6eaa36..8c5e8f0fa 100644 --- a/services/distributeddataservice/app/test/BUILD.gn +++ b/services/distributeddataservice/app/test/BUILD.gn @@ -94,6 +94,7 @@ ohos_unittest("KvStoreDataServiceTest") { cfi = true cfi_cross_dso = true debug = false + blocklist = "${datamgr_service_path}/cfi_blocklist.txt" } configs = [ ":module_private_config" ] diff --git a/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp b/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp index beee71e60..66fe33aae 100644 --- a/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp +++ b/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp @@ -137,8 +137,6 @@ static int32_t WriteContentToFile(const std::string &path, const std::string &co * @tc.name: RegisterClientDeathObserver001 * @tc.desc: register client death observer * @tc.type: FUNC -* @tc.require: AR000CQDU2 -* @tc.author: liuyuhui */ HWTEST_F(KvStoreDataServiceTest, RegisterClientDeathObserver001, TestSize.Level1) { -- Gitee From 86e34b002c732a50de8f7c705d77c320111cad49 Mon Sep 17 00:00:00 2001 From: wangbin Date: Fri, 27 Jun 2025 15:49:39 +0800 Subject: [PATCH 2/2] fix Signed-off-by: wangbin --- .../app/test/unittest/kvstore_data_service_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp b/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp index 66fe33aae..beee71e60 100644 --- a/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp +++ b/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp @@ -137,6 +137,8 @@ static int32_t WriteContentToFile(const std::string &path, const std::string &co * @tc.name: RegisterClientDeathObserver001 * @tc.desc: register client death observer * @tc.type: FUNC +* @tc.require: AR000CQDU2 +* @tc.author: liuyuhui */ HWTEST_F(KvStoreDataServiceTest, RegisterClientDeathObserver001, TestSize.Level1) { -- Gitee