diff --git a/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json b/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json index d1e5310b000de6ea03ffe1fbf28a6331acd38272..e0a4231575e4375353ae1c5c50c9cd5476583985 100644 --- a/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json +++ b/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json @@ -674,6 +674,60 @@ "path": "", "headers": [] }, + { + "name": "hdf:libdisplay_buffer_proxy_1.2", + "so_file_name": "libpower_proxy_1.2.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_hdi_impl_v1_1", + "so_file_name": "libdisplay_buffer_hdi_impl_v1_1.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libsensor_proxy_3.0", + "so_file_name": "libsensor_proxy_3.0.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_proxy_1.1", + "so_file_name": "libdisplay_buffer_proxy_1.1.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_proxy_1.3", + "so_file_name": "libpower_proxy_1.3.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libsensor_proxy_2.0", + "so_file_name": "libsensor_proxy_2.0.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_hdi_impl", + "so_file_name": "libdisplay_buffer_hdi_impl.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_hdi_impl_v1_2", + "so_file_name": "libdisplay_buffer_hdi_impl_v1_2.z.so", + "path": "", + "headers": [] + }, + { + "name": "thirdparty:turbojpeg", + "so_file_name": "libturbojpeg.z.so", + "path": "", + "headers": [] + }, { "name": "drivers_interface_perfgenius:perfgenius_client", "so_file_name": "libperfgenius_client.z.so", @@ -683,13 +737,39 @@ { "name": "drivers_interface_perfgenius:perfgenius", "so_file_name": "libperfgenius_proxy_1.0.z.so", - "path": "", + "path": "//vendor/huawei/drivers/interface/perfgenius/perfgenius/v1_0:perfgenius", + "headers": [ + "//vendor/huawei/drivers/interface/perfgenius/perfgenius" + ] + }, + { + "name": "thirdparty:mbedtls_shared", + "so_file_name": "libmbedtls.z.so", + "path": "//third_party/mbedtls:mbedtls_shared", + "headers": [] + }, + { + "name": "drivers_interface_audio:libaudio_proxy_5.0", + "so_file_name": "libaudio_proxy_5.0.z.so", + "path": "//drivers/interface/audio/v5_0:libaudio_proxy_5.0", "headers": [] }, { + "name": "drivers_interface_display:libdisplay_buffer_hdi_impl_v1_3", + "so_file_name": "libdisplay_buffer_hdi_impl_v1_3.z.so", + "path": "//drivers/interface/display/buffer/v1_3:libdisplay_buffer_hdi_impl_v1_3", + "headers": [] + }, + { "name": "commonlibrary:ylong_runtime", "so_file_name": "libylong_runtime.dylib.so", "path": "//commonlibrary/rust/ylong_runtime/ylong_runtime:ylong_runtime", "headers": [] + }, + { + "name": "hiview:xperfservice_client", + "so_file_name": "libxperfservice_client.z.so", + "path": "//base/hiviewdfx/hiview/plugins/performance/xperf_service/interfaces/inner_api/xperfservice_client:xperfservice_client", + "headers": [] } ] diff --git a/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json b/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json index 4cbf06e296dc604d04998fe8421917c10fb87bb1..fd9662e7ae01e9a4f3e9a45638850ca9034a0a25 100755 --- a/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json +++ b/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json @@ -130,5 +130,95 @@ "so_file_name": "libc++.so", "path": "//build/common/musl:musl-libcxx.so", "headers": [] + }, + { + "name": "build_framework:libc++_shared.so", + "so_file_name": "libc++_shared.so", + "path": "//build/common/libcpp:libc++_shared.so", + "headers": [] + }, + { + "name": "hiviewdfx:libhitracechain", + "so_file_name": "libhitracechain.so", + "path": "//base/hiviewdfx/hitrace/interfaces/native/innerkits:libhitracechain", + "headers": [] + }, + { + "name": "systemabilitymgr:samgr_proxy", + "so_file_name": "libsamgr_proxy.z.so", + "path": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", + "headers": [] + }, + { + "name": "customization:configpolicy_util", + "so_file_name": "libconfigpolicy_util.z.so", + "path": "//base/customization/config_policy/frameworks/config_policy:configpolicy_util", + "headers": [] + }, + { + "name": "hiviewdfx:libhisysevent", + "so_file_name": "libhisysevent.z.so", + "path": "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent:libhisysevent", + "headers": [] + }, + { + "name": "startup:libbeget_proxy", + "so_file_name": "libbeget_proxy.z.so", + "path": "//base/startup/init/interfaces/innerkits:libbeget_proxy", + "headers": [] + }, + { + "name": "hdf_core:libhdf_ipc_adapter", + "so_file_name": "libhdf_ipc_adapter.z.so", + "path": "//drivers/hdf_core/adapter/uhdf2/ipc:libhdf_ipc_adapter", + "headers": [] + }, + { + "name": "thirdparty:jsoncpp", + "so_file_name": "libjsoncpp.z.so", + "path": "//third_party/jsoncpp:jsoncpp", + "headers": [] + }, + { + "name": "commonlibrary:libdmabufheap", + "so_file_name": "libdmabufheap.z.so", + "path": "//commonlibrary/memory_utils/libdmabufheap:libdmabufheap", + "headers": [] + }, + { + "name": "thirdparty:shared_libz", + "so_file_name": "libshared_libz.z.so", + "path": "//third_party/zlib:shared_libz", + "headers": [] + }, + { + "name": "thirdparty:libunwind", + "so_file_name": "libunwind.z.so", + "path": "//third_party/libunwind:libunwind", + "headers": [] + }, + { + "name": "thirdparty:protobuf_lite", + "so_file_name": "libprotobuf_lite.z.so", + "path": "//third_party/protobuf:protobuf_lite", + "headers": [] + }, + { + "name": "tee_client:libteec_vendor", + "so_file_name": "libteec_vendor.so", + "path": "//base/tee/tee_client/frameworks/build/standard:libteec_vendor", + "headers": [] + }, + { + "name": "thirdparty:libcrypto_shared", + "so_file_name": "libcrypto_openssl.z.so", + "path": "//third_party/openssl:libcrypto_shared", + "headers": [] + }, + { + "name": "ipc:ipc_core", + "so_file_name": "libipc_single.z.so", + "path": "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", + "headers": [] } ] \ No newline at end of file diff --git a/tools/deps_guard/rules/Passthrough/passthrough_info.json b/tools/deps_guard/rules/Passthrough/passthrough_info.json index e6cd7097b19551990a87450ee4f67a63f1f6e4a8..09d9fa484d2fcdf714acb74ab82392448e3caa92 100755 --- a/tools/deps_guard/rules/Passthrough/passthrough_info.json +++ b/tools/deps_guard/rules/Passthrough/passthrough_info.json @@ -118,5 +118,41 @@ "so_file_name": "libmetadata_service_1.1.z.so", "path": "//drivers/peripheral/display/buffer/hdi_service:libmetadata_service_1.1", "headers": [] + }, + { + "name": "hdf:libinput_interfaces_service_1.0", + "so_file_name": "libinput_interfaces_service_1.0.z.so", + "path": "//drivers/peripheral/input/hdi_service:libinput_interfaces_service_1.0", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_vendor", + "so_file_name": "libdisplay_buffer_vendor.z.so", + "path": "//device/soc/rockchip/rk3568/hardware/display:libdisplay_buffer_vendor", + "headers": [] + }, + { + "name": "hdf:libcodec_component_manager_service_4.0", + "so_file_name": "libcodec_component_manager_service_4.0.z.so", + "path": "//drivers/peripheral/codec/hal/idl_service:libcodec_component_manager_service_4.0", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_vdi_impl", + "so_file_name": "libdisplay_buffer_vdi_impl.z.so", + "path": "//device/soc/rockchip/rk3568/hardware/display:libdisplay_buffer_vdi_impl", + "headers": [] + }, + { + "name": "drivers_peripheral_memorytracker:libmemory_tracker_interface_service_1.0", + "so_file_name": "libmemory_tracker_interface_service_1.0.z.so", + "path": "//drivers/peripheral/memorytracker/hdi_service:libmemory_tracker_interface_service_1.0", + "headers": [] + }, + { + "name": "drivers_peripheral_display:libmapper_service_1.3", + "so_file_name": "libmapper_service_1.3.z.so", + "path": "//drivers/peripheral/display/buffer/hdi_service:libmapper_service_1.3", + "headers": [] } ] \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/base_innerapi_rule.py b/tools/deps_guard/rules_checker/base_innerapi_rule.py index a23bd704a0f620c3c186e832539538904c7a15cc..171e8261fec4f67900fc4e322135e5f58724487b 100644 --- a/tools/deps_guard/rules_checker/base_innerapi_rule.py +++ b/tools/deps_guard/rules_checker/base_innerapi_rule.py @@ -55,9 +55,9 @@ class BaseInnerapiRule(BaseRule): all(item in self.__valid_system_tags for item in callee_innerapi_tags): continue else: - self.warn("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" + self.error("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" %(mod["name"], callee["name"], mod["labelPath"], callee["path"])) - passed = True + passed = False # mod is vendor only scene elif self.is_only(self.__ignored_tags, mod) == "vendor" and \ all(item in self.__valid_vendor_tags for item in innerapi_tags): @@ -70,5 +70,5 @@ class BaseInnerapiRule(BaseRule): else: self.error("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" %(mod["name"], callee["name"], mod["labelPath"], callee["path"])) - passed = True + passed = False return passed \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/base_rule.py b/tools/deps_guard/rules_checker/base_rule.py index e4ae0c662be9b989c17f29f9c088b52edd5501a8..0877cfddcabf3d1bc63520e7f5fd06f8af5df29c 100755 --- a/tools/deps_guard/rules_checker/base_rule.py +++ b/tools/deps_guard/rules_checker/base_rule.py @@ -70,7 +70,7 @@ class BaseRule(object): return True def check_if_deps_correctly(self, check_modules, valid_mod_tags, valid_dep_tags, white_lists): - # check if mod and callee have wrong innerapi tags + # check if mod and callee have wrong innerapi tags passed = True for mod in check_modules: innerapi_tags = mod["innerapi_tags"] @@ -87,14 +87,14 @@ class BaseRule(object): if callee["name"] in white_lists: continue - passed = True + passed = False wrong_tags = [item for item in dep_innerapi_tags if item not in valid_dep_tags] - self.warn("NEED MODIFY: %s's dep file %s with %s contains wrong dep innerapi_tags [%s] in innerapi_tags [%s]" - %(mod["name"], callee["name"], callee["labelPath"], ",".join(wrong_tags), ",".join(dep_innerapi_tags))) + self.error("NEED MODIFY: %s with innerapi_tags [%s] has dep file %s with %s contains wrong dep innerapi_tags [%s] in innerapi_tags [%s]" + % (mod["name"], ",".join(innerapi_tags), callee["name"], callee["labelPath"], ",".join(wrong_tags), ",".join(dep_innerapi_tags))) else: wrong_tags = [item for item in innerapi_tags if item not in valid_mod_tags] - self.warn("NEED MODIFY: module %s with %s contains wrong mod innerapi_tags [%s] in innerapi_tags [%s]" - %(mod["name"], mod["labelPath"], ",".join(wrong_tags), ",".join(innerapi_tags))) - return True + self.error("NEED MODIFY: module %s with %s contains wrong mod innerapi_tags [%s] in innerapi_tags [%s]" + % (mod["name"], mod["labelPath"], ",".join(wrong_tags), ",".join(innerapi_tags))) + return False return passed \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/chipsetsdk.py b/tools/deps_guard/rules_checker/chipsetsdk.py index aac7edfef208eac091fa44c91a83a7f25277f11b..9b580244a7023fc639ea328f9641f16258218ffe 100755 --- a/tools/deps_guard/rules_checker/chipsetsdk.py +++ b/tools/deps_guard/rules_checker/chipsetsdk.py @@ -85,7 +85,7 @@ class ChipsetSDKRule(BaseRule): return passed passed = self.check_if_deps_correctly( - self.__modules_with_chipsetsdk_tag, self.__valid_mod_tags, self.__valid_mod_tags, self.__indirects) + self.__modules_with_chipsetsdk_indirect_tag, self.__valid_mod_tags, self.__valid_mod_tags, self.__indirects) self.log(f"****check_if_deps_correctly indirect result:{passed}****") if not passed: return passed @@ -210,9 +210,9 @@ class ChipsetSDKRule(BaseRule): continue # Not allowed - passed = True - self.warn("NEED MODIFY: chipset module %s in %s depends on non Chipset SDK module %s in %s" - % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) + passed = False + self.error("NEED MODIFY: chipset module %s in %s depends on non Chipset SDK module %s in %s" + % (mod["name"], mod["labelPath"], callee["name"], callee["labelPath"])) return passed @@ -225,8 +225,8 @@ class ChipsetSDKRule(BaseRule): for mod in self.__modules_with_chipsetsdk_tag: if mod["name"] not in self.get_white_lists(): - passed = True - self.warn('NEED MODIFY: non chipsetsdk module %s with innerapi_tags="chipsetsdk", %s' + passed = False + self.error('NEED MODIFY: non chipsetsdk module %s with innerapi_tags="chipsetsdk", %s' % (mod["name"], mod["labelPath"])) for mod in self.__modules_with_chipsetsdk_indirect_tag: diff --git a/tools/deps_guard/rules_checker/chipsetsdk_sp.py b/tools/deps_guard/rules_checker/chipsetsdk_sp.py index aacff5cf0a7e05e9a9af0d536963fa3662b44652..aba4598c17e0e872e10ca05e6424c37e90027e82 100644 --- a/tools/deps_guard/rules_checker/chipsetsdk_sp.py +++ b/tools/deps_guard/rules_checker/chipsetsdk_sp.py @@ -31,6 +31,8 @@ class ChipsetsdkSPRule(BaseRule): self.__white_lists = self.load_chipsetsdk_json("chipsetsdk_sp_info.json") self.__ignored_tags = ["platformsdk", "sasdk", "platformsdk_indirect", "ndk"] self.__valid_mod_tags = ["llndk", "chipsetsdk_sp", "chipsetsdk_sp_indirect"] + self.__ignored_tags + self.__valid_vendor_tags = ["chipsetsdk", "chipsetsdk_sp", "llndk", "passthrough", + "passthrougth_indirect"] + self.__ignored_tags def get_white_lists(self): return self.__white_lists @@ -174,6 +176,9 @@ class ChipsetsdkSPRule(BaseRule): if mod["path"].startswith("system"): continue + if not mod["name"].endswith(".so"): + continue + # Check chipset modules depends for dep in mod["deps"]: callee = dep["callee"] @@ -191,6 +196,12 @@ class ChipsetsdkSPRule(BaseRule): if callee["name"] in lists: continue + dep_innerapi_tags = callee["innerapi_tags"] + if dep_innerapi_tags and all(item in self.__valid_vendor_tags for item in dep_innerapi_tags): + continue + elif not dep_innerapi_tags: + continue + # If callee is asan library, it is OK if callee["name"].endswith(".asan.so"): continue @@ -200,9 +211,9 @@ class ChipsetsdkSPRule(BaseRule): continue # Not allowed - passed = True - self.warn("NEED MODIFY: chipset_sp module %s in %s depends on non ChipsetSDKSP module %s in %s" - % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) + passed = False + self.error("NEED MODIFY: chipset_sp module %s in %s depends on non ChipsetSDKSP module %s in %s" + % (mod["name"], mod["labelPath"], callee["name"], callee["labelPath"])) return passed @@ -215,8 +226,8 @@ class ChipsetsdkSPRule(BaseRule): for mod in self.__modules_with_chipsetsdk_sp_tag: if mod["name"] not in self.get_white_lists(): - passed = True - self.warn('NEED MODIFY: non chipsetsdk_sp module %s with innerapi_tags="chipsetsdk_sp", %s' + passed = False + self.error('NEED MODIFY: non chipsetsdk_sp module %s with innerapi_tags="chipsetsdk_sp", %s' % (mod["name"], mod["labelPath"])) for mod in self.__modules_with_chipsetsdk_sp_indirect_tag: diff --git a/tools/deps_guard/rules_checker/passthrough.py b/tools/deps_guard/rules_checker/passthrough.py index 3d9115c5538fc7b745888f89ef34c86112873f08..ad1096c698aab7f41bde140cc0ddaf757cc7362e 100644 --- a/tools/deps_guard/rules_checker/passthrough.py +++ b/tools/deps_guard/rules_checker/passthrough.py @@ -205,9 +205,9 @@ class PassthroughRule(BaseRule): continue # Not allowed - passed = True + passed = False self.error("NEED MODIFY: passthrough module %s in %s depends on non passthrough module %s in %s" - % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) + % (mod["name"], mod["labelPath"], callee["name"], callee["labelPath"])) return passed @@ -220,7 +220,7 @@ class PassthroughRule(BaseRule): for mod in self.__modules_with_passthrough_tag: if mod["name"] not in self.get_white_lists(): - passed = True + passed = False self.error('NEED MODIFY: non passthrough %s with innerapi_tags="passthrough", %s' % (mod["name"], mod["labelPath"]))