From 159cbefd7fab5000abe25ad29faaa9a9ea3285e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=98=89=E5=AE=9D?= Date: Tue, 1 Apr 2025 19:47:47 +0800 Subject: [PATCH 1/4] commit msg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄嘉宝 --- bundle.json | 10 -------- interfaces/innerkits/dynamic_cache/BUILD.gn | 24 ------------------- interfaces/innerkits/samgr_proxy/BUILD.gn | 2 +- services/samgr/native/BUILD.gn | 3 ++- services/samgr/native/test/unittest/BUILD.gn | 5 ++-- test/fuzztest/samgr_fuzzer/BUILD.gn | 3 ++- test/fuzztest/samgrcoverage_fuzzer/BUILD.gn | 3 ++- test/fuzztest/samgrdumper_fuzzer/BUILD.gn | 3 ++- .../systemabilitymanager_fuzzer/BUILD.gn | 3 ++- 9 files changed, 14 insertions(+), 42 deletions(-) diff --git a/bundle.json b/bundle.json index a33e0526..1608c2ef 100644 --- a/bundle.json +++ b/bundle.json @@ -54,7 +54,6 @@ "base_group": [], "fwk_group": [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy" ], "service_group": [ @@ -98,15 +97,6 @@ "header_files": [] }, "name": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/rust:samgr_rust" - }, - { - "header": { - "header_base": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", - "header_files": [ - "dynamic_cache.h" - ] - }, - "name": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" } ], "test": [ diff --git a/interfaces/innerkits/dynamic_cache/BUILD.gn b/interfaces/innerkits/dynamic_cache/BUILD.gn index 4c5fc7d3..f595a2b4 100644 --- a/interfaces/innerkits/dynamic_cache/BUILD.gn +++ b/interfaces/innerkits/dynamic_cache/BUILD.gn @@ -20,28 +20,4 @@ config("dynamic_cache_config") { include_dirs = [ "include" ] } -ohos_static_library("dynamic_cache") { - sanitize = { - cfi = true - cfi_cross_dso = true - debug = false - cfi_no_nvcall = true - blocklist = "../../../cfi_blocklist.txt" - } - branch_protector_ret = "pac_ret" - sources = [ "./src/dynamic_cache.cpp" ] - configs = [ "../samgr_proxy:samgr_proxy_config" ] - all_dependent_configs = [ ":dynamic_cache_config" ] - public_configs = [ ":dynamic_cache_config" ] - if (is_standard_system) { - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "init:libbegetutil", - "ipc:ipc_core", - ] - } - part_name = "samgr" - subsystem_name = "systemabilitymgr" -} ################################################################################ diff --git a/interfaces/innerkits/samgr_proxy/BUILD.gn b/interfaces/innerkits/samgr_proxy/BUILD.gn index 852f0b1c..2e22e3ad 100644 --- a/interfaces/innerkits/samgr_proxy/BUILD.gn +++ b/interfaces/innerkits/samgr_proxy/BUILD.gn @@ -54,6 +54,7 @@ ohos_shared_library("samgr_proxy") { "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_on_demand_event.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_status_change_stub.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/service_registry.cpp", @@ -63,7 +64,6 @@ ohos_shared_library("samgr_proxy") { "//foundation/systemabilitymgr/samgr/test/resource:coverage_flags", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] public_configs = [ ":lsamgr_proxy_config", diff --git a/services/samgr/native/BUILD.gn b/services/samgr/native/BUILD.gn index 34cccf36..987ee6e6 100644 --- a/services/samgr/native/BUILD.gn +++ b/services/samgr/native/BUILD.gn @@ -31,6 +31,7 @@ config("sam_config") { "//foundation/systemabilitymgr/samgr/utils/native/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", ] } @@ -48,6 +49,7 @@ ohos_executable("samgr") { install_enable = true sources = [ "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_load_callback_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/ability_death_recipient.cpp", @@ -76,7 +78,6 @@ ohos_executable("samgr") { deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/rust:samgr_rust", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", ] diff --git a/services/samgr/native/test/unittest/BUILD.gn b/services/samgr/native/test/unittest/BUILD.gn index 3b0a2f5c..5d016a41 100644 --- a/services/samgr/native/test/unittest/BUILD.gn +++ b/services/samgr/native/test/unittest/BUILD.gn @@ -23,6 +23,7 @@ config("sam_test_config") { visibility = [ ":*" ] include_dirs = [ "${samgr_services_dir}/test/unittest/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", "//foundation/systemabilitymgr/samgr/services/dfx/include", "//foundation/systemabilitymgr/samgr/utils/native/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", @@ -510,6 +511,7 @@ ohos_unittest("SystemAbilityMgrProxyTest") { "${samgr_services_dir}/test/unittest/src/system_ability_mgr_proxy_test.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", @@ -527,7 +529,6 @@ ohos_unittest("SystemAbilityMgrProxyTest") { deps = [ ":samgr_proxy_tdd", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", ] external_deps = [ @@ -1009,6 +1010,7 @@ ohos_static_library("samgr_proxy_tdd") { "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_on_demand_event.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_status_change_stub.cpp", "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/service_registry.cpp", @@ -1020,7 +1022,6 @@ ohos_static_library("samgr_proxy_tdd") { public_configs = [ ":samgr_proxy_config" ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "json:nlohmann_json_static" ] if (is_standard_system) { external_deps += [ diff --git a/test/fuzztest/samgr_fuzzer/BUILD.gn b/test/fuzztest/samgr_fuzzer/BUILD.gn index 62412f66..4f117329 100644 --- a/test/fuzztest/samgr_fuzzer/BUILD.gn +++ b/test/fuzztest/samgr_fuzzer/BUILD.gn @@ -26,6 +26,7 @@ config("sam_fuzz_test_config") { "${samgr_dir}/services/lsamgr/include", "${samgr_dir}/services/samgr/native/test/unittest/include", "${samgr_dir}/test/fuzztest/samgr_fuzzer/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", ] } @@ -164,10 +165,10 @@ foreach(item, samgr_fuzztests) { "${samgr_services_dir}/source/system_ability_manager_util.cpp", "${samgr_services_dir}/test/unittest/src/mock_accesstoken_kit.cpp", "${samgr_services_dir}/test/unittest/src/mock_permission.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "src/fuzztest_utils.cpp", item.source, ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", diff --git a/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn b/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn index 328c79b6..05a17ee1 100644 --- a/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn +++ b/test/fuzztest/samgrcoverage_fuzzer/BUILD.gn @@ -25,6 +25,7 @@ config("sam_fuzz_test_config") { "${samgr_dir}/services/dfx/include", "${samgr_dir}/services/lsamgr/include", "${samgr_dir}/services/samgr/native/test/unittest/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", ] } @@ -68,9 +69,9 @@ ohos_fuzztest("SamgrCoverageFuzzTest") { "${samgr_services_dir}/test/unittest/src/itest_transaction_service.cpp", "${samgr_services_dir}/test/unittest/src/mock_permission.cpp", "${samgr_services_dir}/test/unittest/src/sa_status_change_mock.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "samgrcoverage_fuzzer.cpp", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", diff --git a/test/fuzztest/samgrdumper_fuzzer/BUILD.gn b/test/fuzztest/samgrdumper_fuzzer/BUILD.gn index d644470c..0c6c7371 100644 --- a/test/fuzztest/samgrdumper_fuzzer/BUILD.gn +++ b/test/fuzztest/samgrdumper_fuzzer/BUILD.gn @@ -25,6 +25,7 @@ config("sam_fuzz_test_config") { "${samgr_dir}/services/dfx/include", "${samgr_dir}/services/lsamgr/include", "${samgr_dir}/services/samgr/native/test/unittest/include", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", ] } @@ -67,9 +68,9 @@ ohos_fuzztest("SamgrDumperFuzzTest") { "${samgr_services_dir}/source/system_ability_manager_util.cpp", "${samgr_services_dir}/test/unittest/src/mock_permission.cpp", "${samgr_services_dir}/test/unittest/src/sa_status_change_mock.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "samgrdumper_fuzzer.cpp", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", diff --git a/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn b/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn index bd0e4c07..9d16b344 100644 --- a/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn +++ b/test/fuzztest/systemabilitymanager_fuzzer/BUILD.gn @@ -22,6 +22,7 @@ samgr_services_dir = "${samgr_dir}/services/samgr/native" config("sam_fuzz_test_config") { include_dirs = [ + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", "//foundation/systemabilitymgr/samgr/services/dfx/include", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", "//foundation/systemabilitymgr/samgr/services/samgr/native/test/unittest/include", @@ -63,13 +64,13 @@ ohos_fuzztest("SystemAbilityManagerFuzzTest") { "${samgr_services_dir}/source/system_ability_manager_dumper.cpp", "${samgr_services_dir}/source/system_ability_manager_stub.cpp", "${samgr_services_dir}/source/system_ability_manager_util.cpp", + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", "//foundation/systemabilitymgr/samgr/services/dfx/source/hisysevent_adapter.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/ability_death_recipient.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/source/rpc_callback_imp.cpp", "//foundation/systemabilitymgr/samgr/services/samgr/native/test/unittest/src/mock_permission.cpp", "systemabilitymanager_fuzzer.cpp", ] - deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] external_deps = [ "access_token:libaccesstoken_sdk", -- Gitee From 93f3f64d7bcaa5447d86f6eeba7ecd0f159aafa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=98=89=E5=AE=9D?= Date: Tue, 1 Apr 2025 20:20:02 +0800 Subject: [PATCH 2/4] commit msg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄嘉宝 --- interfaces/innerkits/dynamic_cache/BUILD.gn | 23 --------------------- interfaces/innerkits/samgr_proxy/BUILD.gn | 6 ++++-- 2 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 interfaces/innerkits/dynamic_cache/BUILD.gn diff --git a/interfaces/innerkits/dynamic_cache/BUILD.gn b/interfaces/innerkits/dynamic_cache/BUILD.gn deleted file mode 100644 index f595a2b4..00000000 --- a/interfaces/innerkits/dynamic_cache/BUILD.gn +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build/ohos.gni") -import("//build/ohos_var.gni") - -################################################################################ - -config("dynamic_cache_config") { - include_dirs = [ "include" ] -} - -################################################################################ diff --git a/interfaces/innerkits/samgr_proxy/BUILD.gn b/interfaces/innerkits/samgr_proxy/BUILD.gn index 2e22e3ad..5d478e1e 100644 --- a/interfaces/innerkits/samgr_proxy/BUILD.gn +++ b/interfaces/innerkits/samgr_proxy/BUILD.gn @@ -20,8 +20,10 @@ config("samgr_proxy_config") { } config("lsamgr_proxy_config") { - include_dirs = - [ "//foundation/systemabilitymgr/samgr/services/lsamgr/include" ] + include_dirs = [ + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/src/dynamic_cache.cpp", + "//foundation/systemabilitymgr/samgr/services/lsamgr/include", + ] } config("samgr_proxy_private_config") { -- Gitee From ea19c5f4ed3f48a8346fb159b3c90c0fb8db698e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=98=89=E5=AE=9D?= Date: Wed, 2 Apr 2025 11:27:07 +0800 Subject: [PATCH 3/4] commit msg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄嘉宝 --- services/samgr/native/test/unittest/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/services/samgr/native/test/unittest/BUILD.gn b/services/samgr/native/test/unittest/BUILD.gn index 5d016a41..25177020 100644 --- a/services/samgr/native/test/unittest/BUILD.gn +++ b/services/samgr/native/test/unittest/BUILD.gn @@ -36,6 +36,7 @@ config("samgr_proxy_config") { config("samgr_proxy_private_config") { include_dirs = [ + "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/lsamgr", "//foundation/systemabilitymgr/samgr/services/lsamgr/include", -- Gitee From 45e9120cd99f0cdceb786d5f1d0d12a462a1d237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=98=89=E5=AE=9D?= Date: Wed, 2 Apr 2025 14:53:20 +0800 Subject: [PATCH 4/4] commit msg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄嘉宝 --- interfaces/innerkits/samgr_proxy/BUILD.gn | 1 - services/samgr/native/test/unittest/BUILD.gn | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/interfaces/innerkits/samgr_proxy/BUILD.gn b/interfaces/innerkits/samgr_proxy/BUILD.gn index 5d478e1e..25c18408 100644 --- a/interfaces/innerkits/samgr_proxy/BUILD.gn +++ b/interfaces/innerkits/samgr_proxy/BUILD.gn @@ -66,7 +66,6 @@ ohos_shared_library("samgr_proxy") { "//foundation/systemabilitymgr/samgr/test/resource:coverage_flags", ] - public_configs = [ ":lsamgr_proxy_config", ":samgr_proxy_config", diff --git a/services/samgr/native/test/unittest/BUILD.gn b/services/samgr/native/test/unittest/BUILD.gn index 25177020..5a81ea1f 100644 --- a/services/samgr/native/test/unittest/BUILD.gn +++ b/services/samgr/native/test/unittest/BUILD.gn @@ -528,9 +528,7 @@ ohos_unittest("SystemAbilityMgrProxyTest") { cflags = [ "-DBINDER_IPC_32BIT" ] } - deps = [ - ":samgr_proxy_tdd", - ] + deps = [ ":samgr_proxy_tdd" ] external_deps = [ "access_token:libaccesstoken_sdk", -- Gitee