From 5bd4e2b34169c5cc5d0ea8840bcc51b2d8e723ea Mon Sep 17 00:00:00 2001 From: wangzhen Date: Sat, 2 Aug 2025 17:36:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=AD=BB=E4=BA=A1=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=BC=98=E5=8C=96=E3=80=81=E7=BB=B4=E6=B5=8B?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangzhen Change-Id: Id64bf54c0f4e4f576d0f46f02c74854454e31756 --- .../include/app_exit_reason_data_manager.h | 1 + .../src/ability_manager_service.cpp | 1 + .../src/app_exit_reason_data_manager.cpp | 45 ++++++++------- services/appmgr/BUILD.gn | 1 + .../appmgr/include/app_mgr_service_inner.h | 1 + services/appmgr/src/app_mgr_service_inner.cpp | 28 +++++---- services/appmgr/src/cache_process_manager.cpp | 2 + services/common/BUILD.gn | 8 +++ services/common/src/event_report.cpp | 2 + .../common/src/permission_verification.cpp | 2 + .../abilityappmgrevent_fuzzer/BUILD.gn | 5 +- .../abilityappmgreventfirst_fuzzer/BUILD.gn | 5 +- .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../cacheprocessmanagera_fuzzer/BUILD.gn | 1 + .../cacheprocessmanagerb_fuzzer/BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + test/fuzztest/uriutils_fuzzer/BUILD.gn | 1 + .../ability_timeout_module_test/BUILD.gn | 1 + .../ams/ability_running_record_test/BUILD.gn | 1 + .../common/ams/app_mgr_service_test/BUILD.gn | 1 + .../common/ams/app_recent_list_test/BUILD.gn | 1 + .../common/ams/app_service_flow_test/BUILD.gn | 1 + .../common/ams/ipc_ams_mgr_test/BUILD.gn | 1 + .../common/ams/ipc_app_mgr_test/BUILD.gn | 1 + .../ams/ipc_app_scheduler_test/BUILD.gn | 1 + .../ams/service_start_process_test/BUILD.gn | 1 + .../running_infos_module_test/BUILD.gn | 1 + .../BUILD.gn | 5 +- .../BUILD.gn | 1 + .../ability_permission_util_test/BUILD.gn | 1 + .../ams_ability_running_record_test/BUILD.gn | 1 + test/unittest/ams_app_workflow_test/BUILD.gn | 1 + .../ams_recent_app_list_test/BUILD.gn | 1 + .../BUILD.gn | 1 + .../ams_service_event_drive_test/BUILD.gn | 1 + .../BUILD.gn | 1 + .../ams_service_startup_test/BUILD.gn | 1 + .../BUILD.gn | 2 + .../app_exit_reason_data_manager_new_test.cpp | 57 ++++++++++++------- .../mock/include/mock_single_kv_store.h | 2 + .../BUILD.gn | 2 + .../BUILD.gn | 2 + .../BUILD.gn | 1 + .../app_mgr_service_fourth_test/BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../app_mgr_service_inner_fourth_test.cpp | 49 ++++++++++++++++ .../app_mgr_service_inner_mock_test/BUILD.gn | 4 +- .../app_mgr_service_inner_ninth_test/BUILD.gn | 1 + .../BUILD.gn | 1 + .../app_mgr_service_inner_tenth_test/BUILD.gn | 1 + .../app_running_processes_info_test/BUILD.gn | 1 + .../BUILD.gn | 1 + .../cache_process_manager_test/BUILD.gn | 1 + .../native_child_process_test/BUILD.gn | 1 + .../screen_unlock_interceptor_test/BUILD.gn | 1 + .../status_bar_delegate_manager_test/BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../BUILD.gn | 1 + 80 files changed, 227 insertions(+), 57 deletions(-) diff --git a/services/abilitymgr/include/app_exit_reason_data_manager.h b/services/abilitymgr/include/app_exit_reason_data_manager.h index dd12043f6ea..fb9332b90da 100644 --- a/services/abilitymgr/include/app_exit_reason_data_manager.h +++ b/services/abilitymgr/include/app_exit_reason_data_manager.h @@ -104,6 +104,7 @@ private: DistributedKv::Key GetSessionIdKey(const int32_t sessionId); DistributedKv::Value ConvertAccessTokenIdToValue(uint32_t accessTokenId); DistributedKv::Status RestoreKvStore(DistributedKv::Status status); + static void PutAsync(const DistributedKv::Key &key, const DistributedKv::Value &value); const DistributedKv::AppId appId_ { "app_exit_reason_storage" }; const DistributedKv::StoreId storeId_ { "app_exit_reason_infos" }; diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index d013717be00..1a87434fadd 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -11856,6 +11856,7 @@ int32_t AbilityManagerService::KillProcessWithReason(int32_t pid, const ExitReas { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); XCOLLIE_TIMER_LESS(__PRETTY_FUNCTION__); + TAG_LOGI(AAFwkTag::ABILITYMGR, "KillProcessWithReason: %{public}s", reason.exitMsg.c_str()); EventInfo eventInfo; eventInfo.callerPid = IPCSkeleton::GetCallingPid(); eventInfo.pid = pid; diff --git a/services/abilitymgr/src/app_exit_reason_data_manager.cpp b/services/abilitymgr/src/app_exit_reason_data_manager.cpp index e359ae084fb..2c762247b0c 100644 --- a/services/abilitymgr/src/app_exit_reason_data_manager.cpp +++ b/services/abilitymgr/src/app_exit_reason_data_manager.cpp @@ -20,8 +20,10 @@ #include "ability_manager_errors.h" #include "accesstoken_kit.h" #include "exit_info_data_manager.h" +#include "ffrt.h" #include "hitrace_meter.h" #include "os_account_manager_wrapper.h" +#include "record_cost_time_util.h" namespace OHOS { namespace AbilityRuntime { @@ -81,6 +83,7 @@ DistributedKv::Status AppExitReasonDataManager::GetKvStore() bool AppExitReasonDataManager::CheckKvStore() { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); + AAFwk::RecordCostTimeUtil timeRecord("CheckKvStore"); TAG_LOGD(AAFwkTag::ABILITYMGR, "AppExitReasonDataManager::CheckKvStore start"); if (kvStorePtr_ != nullptr) { return true; @@ -91,7 +94,7 @@ bool AppExitReasonDataManager::CheckKvStore() if (status == DistributedKv::Status::SUCCESS && kvStorePtr_ != nullptr) { return true; } - TAG_LOGD(AAFwkTag::ABILITYMGR, "try times: %{public}d", tryTimes); + TAG_LOGW(AAFwkTag::ABILITYMGR, "try times: %{public}d", tryTimes); usleep(CHECK_INTERVAL); tryTimes--; } @@ -103,6 +106,7 @@ int32_t AppExitReasonDataManager::SetAppExitReason(const std::string &bundleName const AppExecFwk::RunningProcessInfo &processInfo, bool withKillMsg) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); + AAFwk::RecordCostTimeUtil timeRecord("SetAppExitReason"); if (bundleName.empty() || accessTokenId == Security::AccessToken::INVALID_TOKENID) { TAG_LOGW(AAFwkTag::ABILITYMGR, "invalid value"); return ERR_INVALID_VALUE; @@ -119,17 +123,7 @@ int32_t AppExitReasonDataManager::SetAppExitReason(const std::string &bundleName DistributedKv::Key key(keyStr); DistributedKv::Value value = ConvertAppExitReasonInfoToValue(abilityList, exitReason, processInfo, withKillMsg); - DistributedKv::Status status; - { - HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, "kvStorePtr_->Put"); - std::lock_guard lock(kvStorePtrMutex_); - status = kvStorePtr_->Put(key, value); - } - - if (status != DistributedKv::Status::SUCCESS) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "insert data err: %{public}d", status); - return ERR_INVALID_OPERATION; - } + PutAsync(key, value); TAG_LOGI(AAFwkTag::ABILITYMGR, "set reason info: %{public}s", value.ToString().c_str()); return ERR_OK; } @@ -681,6 +675,7 @@ int32_t AppExitReasonDataManager::SetUIExtensionAbilityExitReason( const AppExecFwk::RunningProcessInfo &processInfo, bool withKillMsg) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); + AAFwk::RecordCostTimeUtil timeRecord("SetUIExtensionAbilityExitReason"); TAG_LOGD(AAFwkTag::ABILITYMGR, "called"); if (bundleName.empty()) { TAG_LOGW(AAFwkTag::ABILITYMGR, "invalid bundle name"); @@ -700,16 +695,7 @@ int32_t AppExitReasonDataManager::SetUIExtensionAbilityExitReason( DistributedKv::Key key(keyEx); DistributedKv::Value value = ConvertAppExitReasonInfoToValueOfExtensionName(extension, exitReason, processInfo, withKillMsg); - DistributedKv::Status status; - { - HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, "kvStorePtr_->Put"); - std::lock_guard lock(kvStorePtrMutex_); - status = kvStorePtr_->Put(key, value); - } - - if (status != DistributedKv::Status::SUCCESS) { - TAG_LOGW(AAFwkTag::ABILITYMGR, "error: %{public}d", status); - } + PutAsync(key, value); } return ERR_OK; @@ -1002,5 +988,20 @@ int32_t AppExitReasonDataManager::GetRecordAppAbilityNames(const uint32_t access return ERR_OK; } + +void AppExitReasonDataManager::PutAsync(const DistributedKv::Key &key, const DistributedKv::Value &value) +{ + auto taskName = "kvStorePtr_->Put"; + ffrt::submit([key, value, taskName]() { + auto pThis = DelayedSingleton::GetInstance(); + HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, taskName); + AAFwk::RecordCostTimeUtil timeRecord(taskName); + std::lock_guard lock(pThis->kvStorePtrMutex_); + auto status = pThis->kvStorePtr_->Put(key, value); + if (status != DistributedKv::Status::SUCCESS) { + TAG_LOGW(AAFwkTag::ABILITYMGR, "insert error: %{public}d", status); + } + }, ffrt::task_attr().name(taskName)); +} } // namespace AbilityRuntime } // namespace OHOS diff --git a/services/appmgr/BUILD.gn b/services/appmgr/BUILD.gn index 81f2ddcdac9..0faf6011933 100644 --- a/services/appmgr/BUILD.gn +++ b/services/appmgr/BUILD.gn @@ -114,6 +114,7 @@ ohos_shared_library("libappms") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/services/appmgr/include/app_mgr_service_inner.h b/services/appmgr/include/app_mgr_service_inner.h index d3f8f0b7264..ba2fd4ab26e 100644 --- a/services/appmgr/include/app_mgr_service_inner.h +++ b/services/appmgr/include/app_mgr_service_inner.h @@ -2075,6 +2075,7 @@ private: std::vector &instanceKeys, int32_t userId); int32_t KillProcessByPidInner(const pid_t pid, const std::string& reason, const std::string& killReason, std::shared_ptr appRecord); + void SetKilledEventInfo(std::shared_ptr appRecord, AAFwk::EventInfo &eventInfo); void AddToKillProcessMap(const std::string &processName); bool IsAllowedNWebPreload(const std::string &processName); void ParseInfoToAppfreeze(const FaultData &faultData, int32_t pid, int32_t uid, const std::string &bundleName, diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 425ab4d6b59..66dd689fce1 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -77,6 +77,7 @@ #include "perf_profile.h" #include "permission_constants.h" #include "permission_verification.h" +#include "record_cost_time_util.h" #include "render_state_observer_manager.h" #include "res_sched_util.h" #include "startup_util.h" @@ -2984,6 +2985,7 @@ int32_t AppMgrServiceInner::KillProcessByPidInner(const pid_t pid, const std::st const std::string& killReason, std::shared_ptr appRecord) { HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__); + AAFwk::RecordCostTimeUtil timeRecord("KillProcessByPidInner"); int32_t ret = -1; if (pid > 0) { if (CheckIsThreadInFoundation(pid)) { @@ -3004,21 +3006,12 @@ int32_t AppMgrServiceInner::KillProcessByPidInner(const pid_t pid, const std::st } CHECK_POINTER_AND_RETURN_VALUE(appRecord, ret); AAFwk::EventInfo eventInfo; + SetKilledEventInfo(appRecord, eventInfo); appRecord->SetKillReason(reason); - auto applicationInfo = appRecord->GetApplicationInfo(); - if (!applicationInfo) { - TAG_LOGE(AAFwkTag::APPMGR, "appInfo null"); - } else { - eventInfo.bundleName = applicationInfo->name; - eventInfo.versionName = applicationInfo->versionName; - eventInfo.versionCode = applicationInfo->versionCode; - } if (ret >= 0) { AddToKillProcessMap(appRecord->GetProcessName()); } DelayedSingleton::GetInstance()->OnProcessKilled(appRecord); - eventInfo.pid = appRecord->GetPid(); - eventInfo.processName = appRecord->GetProcessName(); std::string newReason = appRecord->GetKillReason().empty() ? killReason : appRecord->GetKillReason(); bool foreground = appRecord->GetState() == ApplicationState::APP_STATE_FOREGROUND || appRecord->GetState() == ApplicationState::APP_STATE_FOCUS; @@ -3033,6 +3026,21 @@ int32_t AppMgrServiceInner::KillProcessByPidInner(const pid_t pid, const std::st return ret; } +void AppMgrServiceInner::SetKilledEventInfo(std::shared_ptr appRecord, AAFwk::EventInfo &eventInfo) +{ + CHECK_POINTER_AND_RETURN_LOG(appRecord, "appRecord is null"); + auto applicationInfo = appRecord->GetApplicationInfo(); + if (!applicationInfo) { + TAG_LOGE(AAFwkTag::APPMGR, "appInfo null"); + } else { + eventInfo.bundleName = applicationInfo->name; + eventInfo.versionName = applicationInfo->versionName; + eventInfo.versionCode = applicationInfo->versionCode; + } + eventInfo.pid = appRecord->GetPid(); + eventInfo.processName = appRecord->GetProcessName(); +} + void AppMgrServiceInner::AddToKillProcessMap(const std::string &processName) { std::lock_guard lock(killedProcessMapLock_); diff --git a/services/appmgr/src/cache_process_manager.cpp b/services/appmgr/src/cache_process_manager.cpp index 018e3f0f5a5..9ffcba9fd9b 100644 --- a/services/appmgr/src/cache_process_manager.cpp +++ b/services/appmgr/src/cache_process_manager.cpp @@ -23,6 +23,7 @@ #include "app_utils.h" #include "cache_process_manager.h" #include "hisysevent.h" +#include "record_cost_time_util.h" #include "res_sched_util.h" #include "ui_extension_utils.h" @@ -208,6 +209,7 @@ bool CacheProcessManager::IsCachedProcess(const std::shared_ptr &appRecord) { HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__); + AAFwk::RecordCostTimeUtil timeRecord("OnProcessKilled"); if (!QueryEnableProcessCache()) { return; } diff --git a/services/common/BUILD.gn b/services/common/BUILD.gn index 99a2194892b..fdae4bd1e9c 100644 --- a/services/common/BUILD.gn +++ b/services/common/BUILD.gn @@ -62,6 +62,10 @@ ohos_shared_library("perm_verification") { sources = [ "src/permission_verification.cpp" ] + deps = [ + ":record_cost_time_util", + ] + external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", @@ -95,6 +99,10 @@ ohos_shared_library("event_report") { sources = [ "src/event_report.cpp" ] + deps = [ + ":record_cost_time_util", + ] + external_deps = [ "c_utils:utils", "hilog:libhilog", diff --git a/services/common/src/event_report.cpp b/services/common/src/event_report.cpp index b7c11857f6d..2ea04fd823e 100644 --- a/services/common/src/event_report.cpp +++ b/services/common/src/event_report.cpp @@ -16,6 +16,7 @@ #include "event_report.h" #include "hilog_tag_wrapper.h" #include "hitrace_meter.h" +#include "record_cost_time_util.h" namespace OHOS { namespace AAFwk { @@ -81,6 +82,7 @@ constexpr const int32_t DEFAULT_EXTENSION_TYPE = -1; void EventReport::SendAppEvent(const EventName &eventName, HiSysEventType type, const EventInfo &eventInfo) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); + RecordCostTimeUtil timeRecord("SendAppEvent"); std::string name = ConvertEventName(eventName); if (name == INVALID_EVENT_NAME) { TAG_LOGE(AAFwkTag::DEFAULT, "invalid eventName"); diff --git a/services/common/src/permission_verification.cpp b/services/common/src/permission_verification.cpp index 03d30118d95..6460ec4ecd9 100644 --- a/services/common/src/permission_verification.cpp +++ b/services/common/src/permission_verification.cpp @@ -24,6 +24,7 @@ #include "tokenid_kit.h" #include "hitrace_meter.h" #include "hilog_tag_wrapper.h" +#include "record_cost_time_util.h" namespace OHOS { namespace AAFwk { @@ -54,6 +55,7 @@ bool PermissionVerification::VerifyCallingPermission( const std::string &permissionName, const uint32_t specifyTokenId) const { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); + RecordCostTimeUtil timeRecord("VerifyCallingPermission"); TAG_LOGD(AAFwkTag::DEFAULT, "permission %{public}s, specifyTokenId: %{public}u", permissionName.c_str(), specifyTokenId); auto callerToken = specifyTokenId == 0 ? GetCallingTokenID() : specifyTokenId; diff --git a/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn b/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn index 2d77f0c5f38..54127bcd47d 100644 --- a/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn @@ -39,7 +39,10 @@ ohos_fuzztest("AbilityAppMgrEventFuzzTest") { configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] - deps = [ "${ability_runtime_services_path}/appmgr:libappms" ] + deps = [ + "${ability_runtime_services_path}/appmgr:libappms", + "${ability_runtime_services_path}/common:record_cost_time_util", + ] external_deps = [ "ability_base:configuration", diff --git a/test/fuzztest/abilityappmgreventfirst_fuzzer/BUILD.gn b/test/fuzztest/abilityappmgreventfirst_fuzzer/BUILD.gn index d03bc67d3e4..4bf94474fa3 100644 --- a/test/fuzztest/abilityappmgreventfirst_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityappmgreventfirst_fuzzer/BUILD.gn @@ -39,7 +39,10 @@ ohos_fuzztest("AbilityAppMgrEventFirstFuzzTest") { configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] - deps = [ "${ability_runtime_services_path}/appmgr:libappms" ] + deps = [ + "${ability_runtime_services_path}/appmgr:libappms", + "${ability_runtime_services_path}/common:record_cost_time_util", + ] external_deps = [ "ability_base:configuration", diff --git a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn index 42c0c1b4bb3..2fc3d29e174 100644 --- a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AbilityFirstFrameStateObserverManagerFuzzTest") { "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/abilitykeepalivedatamanager_fuzzer/BUILD.gn b/test/fuzztest/abilitykeepalivedatamanager_fuzzer/BUILD.gn index b79c8c338dd..f9948ac813b 100644 --- a/test/fuzztest/abilitykeepalivedatamanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitykeepalivedatamanager_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("AbilityKeepAliveDataManagerFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn index ac51cfe0da4..001c6957621 100644 --- a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn @@ -76,6 +76,7 @@ ohos_fuzztest("AbilityMgrAppExitReasonHelperFuzzTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn b/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn index 6e1fdd154d2..35ae3d70a21 100755 --- a/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn +++ b/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn @@ -55,6 +55,7 @@ ohos_fuzztest("CacheProcessManageraFuzzTest") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", ] diff --git a/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn b/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn index 75f838f7e99..ac1fb79c758 100755 --- a/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn +++ b/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn @@ -55,6 +55,7 @@ ohos_fuzztest("CacheProcessManagerbFuzzTest") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", ] diff --git a/test/fuzztest/keepaliveprocessmanagereighteenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagereighteenth_fuzzer/BUILD.gn index e61fe921cec..b9515b6872d 100644 --- a/test/fuzztest/keepaliveprocessmanagereighteenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagereighteenth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerEighteenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagereighth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagereighth_fuzzer/BUILD.gn index 4a5f9149a7c..cb815bf317c 100644 --- a/test/fuzztest/keepaliveprocessmanagereighth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagereighth_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerEighthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagereleventh_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagereleventh_fuzzer/BUILD.gn index fd944ac29d1..32bf75cdd81 100644 --- a/test/fuzztest/keepaliveprocessmanagereleventh_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagereleventh_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerEleventhFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerfifteenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerfifteenth_fuzzer/BUILD.gn index b2f75552c7e..65582f901a0 100644 --- a/test/fuzztest/keepaliveprocessmanagerfifteenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerfifteenth_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerFifteenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerfifth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerfifth_fuzzer/BUILD.gn index 4f4698b1467..e2e99632a7a 100644 --- a/test/fuzztest/keepaliveprocessmanagerfifth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerfifth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerFifthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerfirst_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerfirst_fuzzer/BUILD.gn index c2b42dd14e2..24974375c8f 100644 --- a/test/fuzztest/keepaliveprocessmanagerfirst_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerfirst_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerFirstFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerfourteenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerfourteenth_fuzzer/BUILD.gn index ea5819bb1b5..63f9807a935 100644 --- a/test/fuzztest/keepaliveprocessmanagerfourteenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerfourteenth_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerFourteenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerfourth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerfourth_fuzzer/BUILD.gn index 3f8f0f34754..52e0e169eaa 100644 --- a/test/fuzztest/keepaliveprocessmanagerfourth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerfourth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerFourthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerninteenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerninteenth_fuzzer/BUILD.gn index 387da7002d0..64d20fa7d02 100644 --- a/test/fuzztest/keepaliveprocessmanagerninteenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerninteenth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerNinteenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerninth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerninth_fuzzer/BUILD.gn index 5a275f3dfc1..39fdca3deac 100644 --- a/test/fuzztest/keepaliveprocessmanagerninth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerninth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerNinthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagersecond_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagersecond_fuzzer/BUILD.gn index 06a4a959d9f..2b2d2d882a1 100644 --- a/test/fuzztest/keepaliveprocessmanagersecond_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagersecond_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerSecondFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerseventeenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerseventeenth_fuzzer/BUILD.gn index 181525c6ce5..59b08590d33 100644 --- a/test/fuzztest/keepaliveprocessmanagerseventeenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerseventeenth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerSeventeenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerseventh_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerseventh_fuzzer/BUILD.gn index e734c3e63a6..a90f941ce08 100644 --- a/test/fuzztest/keepaliveprocessmanagerseventh_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerseventh_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerSeventhFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagersixteenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagersixteenth_fuzzer/BUILD.gn index 80e5a2060a5..f4ec5bf813b 100644 --- a/test/fuzztest/keepaliveprocessmanagersixteenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagersixteenth_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerSixteenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagersixth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagersixth_fuzzer/BUILD.gn index ebdfc7905bf..48c3944b277 100644 --- a/test/fuzztest/keepaliveprocessmanagersixth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagersixth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerSixthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagertenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagertenth_fuzzer/BUILD.gn index 83199dd197d..97b82a07142 100644 --- a/test/fuzztest/keepaliveprocessmanagertenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagertenth_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerTenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerthird_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerthird_fuzzer/BUILD.gn index 38321088a32..7196e59e83a 100644 --- a/test/fuzztest/keepaliveprocessmanagerthird_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerthird_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerThirdFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagerthirteenth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagerthirteenth_fuzzer/BUILD.gn index f3a81aae382..0bccb3b546e 100644 --- a/test/fuzztest/keepaliveprocessmanagerthirteenth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagerthirteenth_fuzzer/BUILD.gn @@ -66,6 +66,7 @@ ohos_fuzztest("KeepAliveProcessManagerThirteenthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/keepaliveprocessmanagertwelfth_fuzzer/BUILD.gn b/test/fuzztest/keepaliveprocessmanagertwelfth_fuzzer/BUILD.gn index 6dddef10090..759511eb962 100644 --- a/test/fuzztest/keepaliveprocessmanagertwelfth_fuzzer/BUILD.gn +++ b/test/fuzztest/keepaliveprocessmanagertwelfth_fuzzer/BUILD.gn @@ -65,6 +65,7 @@ ohos_fuzztest("KeepAliveProcessManagerTwelfthFuzzTest") { "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/fuzztest/uriutils_fuzzer/BUILD.gn b/test/fuzztest/uriutils_fuzzer/BUILD.gn index 741264a18b7..992ba12030a 100644 --- a/test/fuzztest/uriutils_fuzzer/BUILD.gn +++ b/test/fuzztest/uriutils_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("UriUtilsFuzzTest") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/moduletest/ability_timeout_module_test/BUILD.gn b/test/moduletest/ability_timeout_module_test/BUILD.gn index 47f8e38a9de..44c980c5559 100644 --- a/test/moduletest/ability_timeout_module_test/BUILD.gn +++ b/test/moduletest/ability_timeout_module_test/BUILD.gn @@ -68,6 +68,7 @@ ohos_moduletest("ability_timeout_module_test") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/moduletest/common/ams/ability_running_record_test/BUILD.gn b/test/moduletest/common/ams/ability_running_record_test/BUILD.gn index c2f04fb65e7..caf333db6b3 100644 --- a/test/moduletest/common/ams/ability_running_record_test/BUILD.gn +++ b/test/moduletest/common/ams/ability_running_record_test/BUILD.gn @@ -31,6 +31,7 @@ ohos_moduletest("AmsAbilityRunningRecordModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", ] diff --git a/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn b/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn index 1a31bba8cac..d94882af6ef 100644 --- a/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn +++ b/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn @@ -41,6 +41,7 @@ ohos_moduletest("AmsAppMgrServiceModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", ] diff --git a/test/moduletest/common/ams/app_recent_list_test/BUILD.gn b/test/moduletest/common/ams/app_recent_list_test/BUILD.gn index 19bbcedcf51..d1fbca3d6f0 100644 --- a/test/moduletest/common/ams/app_recent_list_test/BUILD.gn +++ b/test/moduletest/common/ams/app_recent_list_test/BUILD.gn @@ -32,6 +32,7 @@ ohos_moduletest("AmsAppRecentListModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", diff --git a/test/moduletest/common/ams/app_service_flow_test/BUILD.gn b/test/moduletest/common/ams/app_service_flow_test/BUILD.gn index e7ffc1cc158..abd672a7c9e 100644 --- a/test/moduletest/common/ams/app_service_flow_test/BUILD.gn +++ b/test/moduletest/common/ams/app_service_flow_test/BUILD.gn @@ -35,6 +35,7 @@ ohos_moduletest("AmsAppServiceFlowModuleTest") { "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", diff --git a/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn b/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn index ec213b07e27..2c97a2f362e 100644 --- a/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn +++ b/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn @@ -41,6 +41,7 @@ ohos_moduletest("AmsIpcAmsmgrModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", diff --git a/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn b/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn index 62887150372..5c118d8fcb7 100644 --- a/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn +++ b/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn @@ -33,6 +33,7 @@ ohos_moduletest("AmsIpcAppmgrModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", ] diff --git a/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn b/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn index f28a13cbde7..a4659090640 100644 --- a/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn +++ b/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn @@ -33,6 +33,7 @@ ohos_moduletest("AmsIpcAppSchedulerModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", ] diff --git a/test/moduletest/common/ams/service_start_process_test/BUILD.gn b/test/moduletest/common/ams/service_start_process_test/BUILD.gn index 7387986da1d..5b858a8a000 100644 --- a/test/moduletest/common/ams/service_start_process_test/BUILD.gn +++ b/test/moduletest/common/ams/service_start_process_test/BUILD.gn @@ -33,6 +33,7 @@ ohos_moduletest("AmsServiceStartModuleTest") { "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", ] diff --git a/test/moduletest/running_infos_module_test/BUILD.gn b/test/moduletest/running_infos_module_test/BUILD.gn index 829b7f2e4d8..6536a7c81ee 100644 --- a/test/moduletest/running_infos_module_test/BUILD.gn +++ b/test/moduletest/running_infos_module_test/BUILD.gn @@ -70,6 +70,7 @@ ohos_moduletest("running_infos_module_test") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/ability_manager_service_seventh_test/BUILD.gn b/test/unittest/ability_manager_service_seventh_test/BUILD.gn index 6e9c05e6921..7b1e3be494a 100644 --- a/test/unittest/ability_manager_service_seventh_test/BUILD.gn +++ b/test/unittest/ability_manager_service_seventh_test/BUILD.gn @@ -40,7 +40,10 @@ ohos_unittest("ability_manager_service_seventh_test") { "src/permission_verification.cpp", ] - deps = [ "${ability_runtime_innerkits_path}/ability_manager:process_options" ] + deps = [ + "${ability_runtime_innerkits_path}/ability_manager:process_options", + "${ability_runtime_services_path}/common:record_cost_time_util", + ] external_deps = [ "ability_base:session_info", diff --git a/test/unittest/ability_manager_service_third_test/BUILD.gn b/test/unittest/ability_manager_service_third_test/BUILD.gn index d5de8f52b68..86a41de0433 100644 --- a/test/unittest/ability_manager_service_third_test/BUILD.gn +++ b/test/unittest/ability_manager_service_third_test/BUILD.gn @@ -90,6 +90,7 @@ ohos_unittest("ability_manager_service_third_test") { "${ability_runtime_innerkits_path}/ability_manager:start_window_option", "${ability_runtime_innerkits_path}/connectionobs_manager:connection_obs_manager", "${ability_runtime_innerkits_path}/session_handler:session_handler", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", ] diff --git a/test/unittest/ability_permission_util_test/BUILD.gn b/test/unittest/ability_permission_util_test/BUILD.gn index b7e18da6881..c92f2ae1cd8 100644 --- a/test/unittest/ability_permission_util_test/BUILD.gn +++ b/test/unittest/ability_permission_util_test/BUILD.gn @@ -55,6 +55,7 @@ ohos_unittest("ability_permission_util_test") { "${ability_runtime_innerkits_path}/ability_manager:ability_manager", "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/unittest/ams_ability_running_record_test/BUILD.gn b/test/unittest/ams_ability_running_record_test/BUILD.gn index 5403becfe77..75a2b6debed 100644 --- a/test/unittest/ams_ability_running_record_test/BUILD.gn +++ b/test/unittest/ams_ability_running_record_test/BUILD.gn @@ -65,6 +65,7 @@ ohos_unittest("AmsAbilityRunningRecordTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/ams_app_workflow_test/BUILD.gn b/test/unittest/ams_app_workflow_test/BUILD.gn index e645d3d63a2..ca6d42647e6 100644 --- a/test/unittest/ams_app_workflow_test/BUILD.gn +++ b/test/unittest/ams_app_workflow_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("AmsWorkFlowTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/ams_recent_app_list_test/BUILD.gn b/test/unittest/ams_recent_app_list_test/BUILD.gn index 1c4b9e155f4..6a4f46895ae 100644 --- a/test/unittest/ams_recent_app_list_test/BUILD.gn +++ b/test/unittest/ams_recent_app_list_test/BUILD.gn @@ -66,6 +66,7 @@ ohos_unittest("AmsRecentAppListTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/ams_service_app_spawn_client_test/BUILD.gn b/test/unittest/ams_service_app_spawn_client_test/BUILD.gn index e4d21f86ff3..c1c42a7a536 100644 --- a/test/unittest/ams_service_app_spawn_client_test/BUILD.gn +++ b/test/unittest/ams_service_app_spawn_client_test/BUILD.gn @@ -69,6 +69,7 @@ ohos_unittest("AmsServiceAppSpawnClientTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/ams_service_event_drive_test/BUILD.gn b/test/unittest/ams_service_event_drive_test/BUILD.gn index 6bdbdc23728..820c6515e0b 100644 --- a/test/unittest/ams_service_event_drive_test/BUILD.gn +++ b/test/unittest/ams_service_event_drive_test/BUILD.gn @@ -69,6 +69,7 @@ ohos_unittest("AmsServiceEventDriveTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/ams_service_load_ability_process_test/BUILD.gn b/test/unittest/ams_service_load_ability_process_test/BUILD.gn index 7ee8b3694f2..f32e2122489 100644 --- a/test/unittest/ams_service_load_ability_process_test/BUILD.gn +++ b/test/unittest/ams_service_load_ability_process_test/BUILD.gn @@ -74,6 +74,7 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/ams_service_startup_test/BUILD.gn b/test/unittest/ams_service_startup_test/BUILD.gn index 5c1ed7303c2..e6d6196ac45 100644 --- a/test/unittest/ams_service_startup_test/BUILD.gn +++ b/test/unittest/ams_service_startup_test/BUILD.gn @@ -66,6 +66,7 @@ ohos_unittest("AmsServiceStartupTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/app_exit_reason_data_manager_new_test/BUILD.gn b/test/unittest/app_exit_reason_data_manager_new_test/BUILD.gn index 5ba95e05926..b6c3f8eef32 100644 --- a/test/unittest/app_exit_reason_data_manager_new_test/BUILD.gn +++ b/test/unittest/app_exit_reason_data_manager_new_test/BUILD.gn @@ -42,11 +42,13 @@ ohos_unittest("app_exit_reason_data_manager_new_test") { "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", + "ffrt:libffrt", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", diff --git a/test/unittest/app_exit_reason_data_manager_new_test/app_exit_reason_data_manager_new_test.cpp b/test/unittest/app_exit_reason_data_manager_new_test/app_exit_reason_data_manager_new_test.cpp index 9aff32eaf10..2b10b38392e 100644 --- a/test/unittest/app_exit_reason_data_manager_new_test/app_exit_reason_data_manager_new_test.cpp +++ b/test/unittest/app_exit_reason_data_manager_new_test/app_exit_reason_data_manager_new_test.cpp @@ -38,6 +38,7 @@ const std::string JSON_KEY_SUB_KILL_REASON = "sub_kill_reason"; const std::string JSON_KEY_EXIT_MSG = "exit_msg"; constexpr uint32_t ACCESS_TOKEN_ID = 123; const int SESSION_ID = 111; +constexpr int32_t TIME_SLEEP = 4000; } // namespace class AppExitReasonDataManagerTest : public testing::Test { @@ -355,27 +356,6 @@ HWTEST_F(AppExitReasonDataManagerTest, AppExitReasonDataManager_RecordSignalReas EXPECT_EQ(result, AAFwk::ERR_GET_EXIT_INFO_FAILED); } -/* * - * @tc.name: AppExitReasonDataManager_SetAppExitReason_002 - * @tc.desc: SetAppExitReason - * @tc.type: FUNC - */ -HWTEST_F(AppExitReasonDataManagerTest, AppExitReasonDataManager_SetAppExitReason_002, TestSize.Level1) -{ - std::vector abilityList; - abilityList.push_back(ABILITY_NAME); - AAFwk::ExitReason exitReason = {AAFwk::REASON_JS_ERROR, "Js Error."}; - AppExecFwk::RunningProcessInfo processInfo; - - std::shared_ptr kvStorePtr = std::make_shared(); - kvStorePtr->Put_ = DistributedKv::Status::ERROR; - DelayedSingleton::GetInstance()->kvStorePtr_ = kvStorePtr; - - auto result = DelayedSingleton::GetInstance()->SetAppExitReason( - BUNDLE_NAME, ACCESS_TOKEN_ID, abilityList, exitReason, processInfo, false); - EXPECT_EQ(result, ERR_INVALID_OPERATION); -} - /* * * @tc.name: AppExitReasonDataManager_ConvertReasonFromValue_002 * @tc.desc: ConvertReasonFromValue @@ -527,5 +507,40 @@ HWTEST_F(AppExitReasonDataManagerTest, AppExitReasonDataManager_ConvertAppExitRe auto exitMsg = jsonObject.at(JSON_KEY_EXIT_MSG).get(); EXPECT_EQ(exitMsg, exitReason.exitMsg); } + +/** + * @tc.name: AppExitReasonDataManager_PutAsync_001 + * @tc.desc: PutAsync + * @tc.type: FUNC + */ +HWTEST_F(AppExitReasonDataManagerTest, AppExitReasonDataManager_PutAsync_001, TestSize.Level1) +{ + std::shared_ptr kvStorePtr = std::make_shared(); + DelayedSingleton::GetInstance()->kvStorePtr_ = kvStorePtr; + + DistributedKv::Key key("test_key"); + DistributedKv::Value value("test_value"); + AppExitReasonDataManager::PutAsync(key, value); + usleep(TIME_SLEEP); + EXPECT_EQ(kvStorePtr->putCallTimes_, 1); +} + +/** + * @tc.name: AppExitReasonDataManager_PutAsync_002 + * @tc.desc: PutAsync + * @tc.type: FUNC + */ +HWTEST_F(AppExitReasonDataManagerTest, AppExitReasonDataManager_PutAsync_002, TestSize.Level1) +{ + std::shared_ptr kvStorePtr = std::make_shared(); + kvStorePtr->Put_ = DistributedKv::Status::ERROR; + DelayedSingleton::GetInstance()->kvStorePtr_ = kvStorePtr; + + DistributedKv::Key key("test_key"); + DistributedKv::Value value("test_value"); + AppExitReasonDataManager::PutAsync(key, value); + usleep(TIME_SLEEP); + EXPECT_EQ(kvStorePtr->putCallTimes_, 1); +} } // namespace AbilityRuntime } // namespace OHOS diff --git a/test/unittest/app_exit_reason_data_manager_new_test/mock/include/mock_single_kv_store.h b/test/unittest/app_exit_reason_data_manager_new_test/mock/include/mock_single_kv_store.h index b544c7fe362..4ea253c691a 100644 --- a/test/unittest/app_exit_reason_data_manager_new_test/mock/include/mock_single_kv_store.h +++ b/test/unittest/app_exit_reason_data_manager_new_test/mock/include/mock_single_kv_store.h @@ -143,6 +143,7 @@ public: DistributedKv::Status Put(const DistributedKv::Key &key, const DistributedKv::Value &value) override { + putCallTimes_++; return Put_; }; @@ -206,6 +207,7 @@ public: DistributedKv::Status GetEntries_ = DistributedKv::Status::SUCCESS; DistributedKv::Status Delete_ = DistributedKv::Status::SUCCESS; DistributedKv::Status Put_ = DistributedKv::Status::SUCCESS; + int32_t putCallTimes_ = 0; DistributedKv::Status Get_ = DistributedKv::Status::SUCCESS; }; } diff --git a/test/unittest/app_exit_reason_data_manager_second_test/BUILD.gn b/test/unittest/app_exit_reason_data_manager_second_test/BUILD.gn index dd01857b0cd..613f79b7725 100644 --- a/test/unittest/app_exit_reason_data_manager_second_test/BUILD.gn +++ b/test/unittest/app_exit_reason_data_manager_second_test/BUILD.gn @@ -42,11 +42,13 @@ ohos_unittest("app_exit_reason_data_manager_second_test") { "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", + "ffrt:libffrt", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", diff --git a/test/unittest/app_exit_reason_data_manager_test/BUILD.gn b/test/unittest/app_exit_reason_data_manager_test/BUILD.gn index 0bf171ef317..c26ef408132 100755 --- a/test/unittest/app_exit_reason_data_manager_test/BUILD.gn +++ b/test/unittest/app_exit_reason_data_manager_test/BUILD.gn @@ -42,11 +42,13 @@ ohos_unittest("app_exit_reason_data_manager_test") { "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", + "ffrt:libffrt", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", diff --git a/test/unittest/app_mgr_service_event_handler_test/BUILD.gn b/test/unittest/app_mgr_service_event_handler_test/BUILD.gn index b6144327770..d3990af613f 100644 --- a/test/unittest/app_mgr_service_event_handler_test/BUILD.gn +++ b/test/unittest/app_mgr_service_event_handler_test/BUILD.gn @@ -70,6 +70,7 @@ ohos_unittest("AMSEventHandlerTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/app_mgr_service_fourth_test/BUILD.gn b/test/unittest/app_mgr_service_fourth_test/BUILD.gn index 033bb463ef3..3acb0107ed8 100644 --- a/test/unittest/app_mgr_service_fourth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_fourth_test/BUILD.gn @@ -61,6 +61,7 @@ ohos_unittest("app_mgr_service_fourth_test") { "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_test_path}/moduletest/common/ams:appmgr_mst_source", "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn index 4e733fee508..136073f96b8 100644 --- a/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn @@ -101,6 +101,7 @@ ohos_unittest("app_mgr_service_inner_eighth_test") { "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", diff --git a/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn index bb6fbcb1d57..7f2e88f1826 100644 --- a/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn @@ -55,6 +55,7 @@ ohos_unittest("AppMgrServiceInnerFourthTest") { "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/appmgr:libappms", + "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/app_mgr_service_inner_fourth_test/app_mgr_service_inner_fourth_test.cpp b/test/unittest/app_mgr_service_inner_fourth_test/app_mgr_service_inner_fourth_test.cpp index ed9c41ed68c..74446103db0 100644 --- a/test/unittest/app_mgr_service_inner_fourth_test/app_mgr_service_inner_fourth_test.cpp +++ b/test/unittest/app_mgr_service_inner_fourth_test/app_mgr_service_inner_fourth_test.cpp @@ -537,5 +537,54 @@ HWTEST_F(AppMgrServiceInnerFourthTest, CreateAppRunningRecord_002, TestSize.Leve EXPECT_NE(record, nullptr); TAG_LOGI(AAFwkTag::TEST, "CreateAppRunningRecord_002 end"); } + +/** + * @tc.name: SetKilledEventInfo_001 + * @tc.Function: SetKilledEventInfo + */ +HWTEST_F(AppMgrServiceInnerFourthTest, SetKilledEventInfo_001, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "SetKilledEventInfo_001 start"); + AAFwk::EventInfo eventInfo; + auto appMgrServiceInner = std::make_shared(); + appMgrServiceInner->SetKilledEventInfo(nullptr, eventInfo); + EXPECT_EQ(eventInfo.pid, -1); + TAG_LOGI(AAFwkTag::TEST, "SetKilledEventInfo_001 end"); +} + +/** + * @tc.name: SetKilledEventInfo_002 + * @tc.Function: SetKilledEventInfo + */ +HWTEST_F(AppMgrServiceInnerFourthTest, SetKilledEventInfo_002, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "SetKilledEventInfo_002 start"); + AAFwk::EventInfo eventInfo; + auto appMgrServiceInner = std::make_shared(); + + auto appRecord = std::make_shared(nullptr, 0, "process_name"); + appMgrServiceInner->SetKilledEventInfo(appRecord, eventInfo); + EXPECT_EQ(eventInfo.processName, "process_name"); + EXPECT_TRUE(eventInfo.bundleName.empty()); + TAG_LOGI(AAFwkTag::TEST, "SetKilledEventInfo_002 end"); +} + +/** + * @tc.name: SetKilledEventInfo_003 + * @tc.Function: SetKilledEventInfo + */ +HWTEST_F(AppMgrServiceInnerFourthTest, SetKilledEventInfo_003, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "SetKilledEventInfo_003 start"); + AAFwk::EventInfo eventInfo; + auto appMgrServiceInner = std::make_shared(); + auto appInfo = std::make_shared(); + appInfo->name = "bundle_name"; + auto appRecord = std::make_shared(appInfo, 0, "process_name"); + appMgrServiceInner->SetKilledEventInfo(appRecord, eventInfo); + EXPECT_EQ(eventInfo.processName, "process_name"); + EXPECT_EQ(eventInfo.bundleName, "bundle_name"); + TAG_LOGI(AAFwkTag::TEST, "SetKilledEventInfo_003 end"); +} } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn b/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn index 2ac11e3423a..9c76bb908df 100644 --- a/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn @@ -43,7 +43,9 @@ ohos_unittest("app_mgr_service_inner_mock_test") { "src/window_manager.cpp", ] - deps = [] + deps = [ + "${ability_runtime_services_path}/common:record_cost_time_util", + ] external_deps = [ "ability_base:want", diff --git a/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn index 23f8d57881a..0ad3739a084 100644 --- a/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn @@ -100,6 +100,7 @@ ohos_unittest("app_mgr_service_inner_ninth_test") { "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", diff --git a/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn b/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn index 444e58b6285..b5a2dfff8d4 100644 --- a/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn @@ -100,6 +100,7 @@ ohos_unittest("app_mgr_service_inner_seventh_test") { "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", diff --git a/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn index a329a9a1164..e8bb5daeb20 100644 --- a/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn @@ -105,6 +105,7 @@ ohos_unittest("app_mgr_service_inner_tenth_test") { "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", diff --git a/test/unittest/app_running_processes_info_test/BUILD.gn b/test/unittest/app_running_processes_info_test/BUILD.gn index 38ca4ebfca0..f0b3a972bc6 100644 --- a/test/unittest/app_running_processes_info_test/BUILD.gn +++ b/test/unittest/app_running_processes_info_test/BUILD.gn @@ -68,6 +68,7 @@ ohos_unittest("AppRunningProcessesInfoTest") { "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", "${ability_runtime_test_path}/unittest:appmgr_test_source", diff --git a/test/unittest/cache_process_manager_second_test/BUILD.gn b/test/unittest/cache_process_manager_second_test/BUILD.gn index 864735a568b..b5c619b90d5 100644 --- a/test/unittest/cache_process_manager_second_test/BUILD.gn +++ b/test/unittest/cache_process_manager_second_test/BUILD.gn @@ -114,6 +114,7 @@ ohos_unittest("cache_process_manager_second_test") { "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:event_report", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", diff --git a/test/unittest/cache_process_manager_test/BUILD.gn b/test/unittest/cache_process_manager_test/BUILD.gn index e6175d65d7f..f85f3fd1b3b 100644 --- a/test/unittest/cache_process_manager_test/BUILD.gn +++ b/test/unittest/cache_process_manager_test/BUILD.gn @@ -45,6 +45,7 @@ ohos_unittest("cache_process_manager_test") { "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:res_sched_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/native_child_process_test/BUILD.gn b/test/unittest/native_child_process_test/BUILD.gn index eb3c4ee3b76..a5c812b90b0 100644 --- a/test/unittest/native_child_process_test/BUILD.gn +++ b/test/unittest/native_child_process_test/BUILD.gn @@ -70,6 +70,7 @@ ohos_unittest("native_child_process_test") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/screen_unlock_interceptor_test/BUILD.gn b/test/unittest/screen_unlock_interceptor_test/BUILD.gn index 2cc6a489dc9..493164aa5f7 100644 --- a/test/unittest/screen_unlock_interceptor_test/BUILD.gn +++ b/test/unittest/screen_unlock_interceptor_test/BUILD.gn @@ -51,6 +51,7 @@ ohos_unittest("screen_unlock_interceptor_test") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", ] external_deps = [ diff --git a/test/unittest/status_bar_delegate_manager_test/BUILD.gn b/test/unittest/status_bar_delegate_manager_test/BUILD.gn index afdc0331df7..50200aaa2cb 100644 --- a/test/unittest/status_bar_delegate_manager_test/BUILD.gn +++ b/test/unittest/status_bar_delegate_manager_test/BUILD.gn @@ -59,6 +59,7 @@ ohos_unittest("status_bar_delegate_manager_test") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn b/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn index 9ddaf1dc4a2..3942668ac81 100644 --- a/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn +++ b/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn @@ -70,6 +70,7 @@ ohos_unittest("ui_ability_lifecycle_manager_second_test") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn b/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn index a4b5d12e053..5e3b9c6cd9f 100644 --- a/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn +++ b/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn @@ -64,6 +64,7 @@ ohos_unittest("ui_ability_lifecycle_manager_test") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] diff --git a/test/unittest/ui_ability_lifecycle_manager_third_test/BUILD.gn b/test/unittest/ui_ability_lifecycle_manager_third_test/BUILD.gn index b2c9a7a5ed0..7268d7e63de 100644 --- a/test/unittest/ui_ability_lifecycle_manager_third_test/BUILD.gn +++ b/test/unittest/ui_ability_lifecycle_manager_third_test/BUILD.gn @@ -71,6 +71,7 @@ ohos_unittest("ui_ability_lifecycle_manager_third_test") { "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:app_util", "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_services_path}/common:record_cost_time_util", "${ability_runtime_services_path}/common:task_handler_wrap", ] -- Gitee From 8e57b29f2bedfa3bf6875002ee6851d96857524a Mon Sep 17 00:00:00 2001 From: wangzhen Date: Mon, 4 Aug 2025 11:53:16 +0800 Subject: [PATCH 2/2] Code review Signed-off-by: wangzhen Change-Id: I6a11363fe652ded0139471ba983783942d00fcf6 --- .../include/app_exit_reason_data_manager.h | 2 +- services/abilitymgr/src/ability_manager_service.cpp | 4 ++-- .../abilitymgr/src/app_exit_reason_data_manager.cpp | 12 ++++++------ services/appmgr/BUILD.gn | 2 +- services/appmgr/src/cache_process_manager.cpp | 2 +- services/common/src/permission_verification.cpp | 2 +- test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../abilitymgrappexitreasonhelper_fuzzer/BUILD.gn | 2 +- test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn | 2 +- test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn | 2 +- test/moduletest/ability_timeout_module_test/BUILD.gn | 2 +- .../common/ams/ability_running_record_test/BUILD.gn | 2 +- .../common/ams/app_mgr_service_test/BUILD.gn | 2 +- .../common/ams/app_service_flow_test/BUILD.gn | 2 +- test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn | 2 +- test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn | 2 +- .../common/ams/ipc_app_scheduler_test/BUILD.gn | 2 +- .../common/ams/service_start_process_test/BUILD.gn | 2 +- .../ams_ability_running_record_test/BUILD.gn | 2 +- test/unittest/ams_app_workflow_test/BUILD.gn | 2 +- test/unittest/ams_recent_app_list_test/BUILD.gn | 2 +- .../ams_service_app_spawn_client_test/BUILD.gn | 2 +- test/unittest/ams_service_event_drive_test/BUILD.gn | 2 +- .../ams_service_load_ability_process_test/BUILD.gn | 2 +- test/unittest/ams_service_startup_test/BUILD.gn | 2 +- .../app_exit_reason_data_manager_test/BUILD.gn | 2 +- .../app_mgr_service_event_handler_test/BUILD.gn | 2 +- .../app_mgr_service_inner_mock_test/BUILD.gn | 2 +- .../app_running_processes_info_test/BUILD.gn | 2 +- .../cache_process_manager_second_test/BUILD.gn | 2 +- test/unittest/cache_process_manager_test/BUILD.gn | 2 +- .../status_bar_delegate_manager_test/BUILD.gn | 2 +- .../ui_ability_lifecycle_manager_test/BUILD.gn | 2 +- 34 files changed, 40 insertions(+), 40 deletions(-) diff --git a/services/abilitymgr/include/app_exit_reason_data_manager.h b/services/abilitymgr/include/app_exit_reason_data_manager.h index fb9332b90da..0783a97f873 100644 --- a/services/abilitymgr/include/app_exit_reason_data_manager.h +++ b/services/abilitymgr/include/app_exit_reason_data_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index 1a87434fadd..57e0212db60 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -11856,14 +11856,14 @@ int32_t AbilityManagerService::KillProcessWithReason(int32_t pid, const ExitReas { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); XCOLLIE_TIMER_LESS(__PRETTY_FUNCTION__); - TAG_LOGI(AAFwkTag::ABILITYMGR, "KillProcessWithReason: %{public}s", reason.exitMsg.c_str()); EventInfo eventInfo; eventInfo.callerPid = IPCSkeleton::GetCallingPid(); eventInfo.pid = pid; eventInfo.exitMsg = reason.exitMsg; eventInfo.shouldKillForeground = reason.shouldKillForeground; auto ret = KillProcessWithReasonInner(pid, reason); - TAG_LOGI(AAFwkTag::ABILITYMGR, "KillProcessWithReason ret: %{public}d", ret); + TAG_LOGE(AAFwkTag::ABILITYMGR, "KillProcessWithReason ret: %{public}d, reason: %{public}s", ret, + reason.exitMsg.c_str()); if (reason.reason == Reason::REASON_RESOURCE_CONTROL && reason.exitMsg == GlobalConstant::LOW_MEMORY_KILL) { eventHelper_.SendKillProcessWithReasonEvent(ret, "KillProcessWithReason", eventInfo); } diff --git a/services/abilitymgr/src/app_exit_reason_data_manager.cpp b/services/abilitymgr/src/app_exit_reason_data_manager.cpp index 2c762247b0c..95574623ed8 100644 --- a/services/abilitymgr/src/app_exit_reason_data_manager.cpp +++ b/services/abilitymgr/src/app_exit_reason_data_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -50,6 +50,7 @@ const std::string JSON_KEY_PROCESS_NAME = "process_name"; const std::string JSON_KEY_PSS_VALUE = "pss_value"; const std::string JSON_KEY_RSS_VALUE = "rss_value"; const std::string JSON_KEY_PROSESS_STATE = "process_state"; +constexpr const char* PUT_TASK_NAME = "kvStorePtr_->Put"; } // namespace AppExitReasonDataManager::AppExitReasonDataManager() {} @@ -991,17 +992,16 @@ int32_t AppExitReasonDataManager::GetRecordAppAbilityNames(const uint32_t access void AppExitReasonDataManager::PutAsync(const DistributedKv::Key &key, const DistributedKv::Value &value) { - auto taskName = "kvStorePtr_->Put"; - ffrt::submit([key, value, taskName]() { + ffrt::submit([key, value]() { auto pThis = DelayedSingleton::GetInstance(); - HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, taskName); - AAFwk::RecordCostTimeUtil timeRecord(taskName); + HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, PUT_TASK_NAME); + AAFwk::RecordCostTimeUtil timeRecord(PUT_TASK_NAME); std::lock_guard lock(pThis->kvStorePtrMutex_); auto status = pThis->kvStorePtr_->Put(key, value); if (status != DistributedKv::Status::SUCCESS) { TAG_LOGW(AAFwkTag::ABILITYMGR, "insert error: %{public}d", status); } - }, ffrt::task_attr().name(taskName)); + }, ffrt::task_attr().name(PUT_TASK_NAME)); } } // namespace AbilityRuntime } // namespace OHOS diff --git a/services/appmgr/BUILD.gn b/services/appmgr/BUILD.gn index 0faf6011933..b9d6640df6b 100644 --- a/services/appmgr/BUILD.gn +++ b/services/appmgr/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/services/appmgr/src/cache_process_manager.cpp b/services/appmgr/src/cache_process_manager.cpp index 9ffcba9fd9b..a9ff065a1fe 100644 --- a/services/appmgr/src/cache_process_manager.cpp +++ b/services/appmgr/src/cache_process_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 diff --git a/services/common/src/permission_verification.cpp b/services/common/src/permission_verification.cpp index 6460ec4ecd9..ef809e79ca6 100644 --- a/services/common/src/permission_verification.cpp +++ b/services/common/src/permission_verification.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 diff --git a/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn b/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn index 54127bcd47d..91b7629f1a4 100644 --- a/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityappmgrevent_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn index 2fc3d29e174..ecafbd30b60 100644 --- a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn index 001c6957621..3380a300f89 100644 --- a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn b/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn index 35ae3d70a21..4ae2a07e930 100755 --- a/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn +++ b/test/fuzztest/cacheprocessmanagera_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn b/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn index ac1fb79c758..14f7982daf1 100755 --- a/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn +++ b/test/fuzztest/cacheprocessmanagerb_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/moduletest/ability_timeout_module_test/BUILD.gn b/test/moduletest/ability_timeout_module_test/BUILD.gn index 44c980c5559..24d5bf9a3ec 100644 --- a/test/moduletest/ability_timeout_module_test/BUILD.gn +++ b/test/moduletest/ability_timeout_module_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 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 diff --git a/test/moduletest/common/ams/ability_running_record_test/BUILD.gn b/test/moduletest/common/ams/ability_running_record_test/BUILD.gn index caf333db6b3..60e8956a967 100644 --- a/test/moduletest/common/ams/ability_running_record_test/BUILD.gn +++ b/test/moduletest/common/ams/ability_running_record_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn b/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn index d94882af6ef..245d98c4f01 100644 --- a/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn +++ b/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/moduletest/common/ams/app_service_flow_test/BUILD.gn b/test/moduletest/common/ams/app_service_flow_test/BUILD.gn index abd672a7c9e..9a41ae9d754 100644 --- a/test/moduletest/common/ams/app_service_flow_test/BUILD.gn +++ b/test/moduletest/common/ams/app_service_flow_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn b/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn index 2c97a2f362e..effd5e6d6f7 100644 --- a/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn +++ b/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn b/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn index 5c118d8fcb7..9689d74f1b5 100644 --- a/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn +++ b/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn b/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn index a4659090640..8f3185e86e1 100644 --- a/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn +++ b/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/moduletest/common/ams/service_start_process_test/BUILD.gn b/test/moduletest/common/ams/service_start_process_test/BUILD.gn index 5b858a8a000..92bf5be75cb 100644 --- a/test/moduletest/common/ams/service_start_process_test/BUILD.gn +++ b/test/moduletest/common/ams/service_start_process_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_ability_running_record_test/BUILD.gn b/test/unittest/ams_ability_running_record_test/BUILD.gn index 75a2b6debed..7064b15201a 100644 --- a/test/unittest/ams_ability_running_record_test/BUILD.gn +++ b/test/unittest/ams_ability_running_record_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_app_workflow_test/BUILD.gn b/test/unittest/ams_app_workflow_test/BUILD.gn index ca6d42647e6..58a0b0303e2 100644 --- a/test/unittest/ams_app_workflow_test/BUILD.gn +++ b/test/unittest/ams_app_workflow_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_recent_app_list_test/BUILD.gn b/test/unittest/ams_recent_app_list_test/BUILD.gn index 6a4f46895ae..d60d2ca0441 100644 --- a/test/unittest/ams_recent_app_list_test/BUILD.gn +++ b/test/unittest/ams_recent_app_list_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_service_app_spawn_client_test/BUILD.gn b/test/unittest/ams_service_app_spawn_client_test/BUILD.gn index c1c42a7a536..0077518b672 100644 --- a/test/unittest/ams_service_app_spawn_client_test/BUILD.gn +++ b/test/unittest/ams_service_app_spawn_client_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_service_event_drive_test/BUILD.gn b/test/unittest/ams_service_event_drive_test/BUILD.gn index 820c6515e0b..b8c94365e88 100644 --- a/test/unittest/ams_service_event_drive_test/BUILD.gn +++ b/test/unittest/ams_service_event_drive_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_service_load_ability_process_test/BUILD.gn b/test/unittest/ams_service_load_ability_process_test/BUILD.gn index f32e2122489..8ceefa8055c 100644 --- a/test/unittest/ams_service_load_ability_process_test/BUILD.gn +++ b/test/unittest/ams_service_load_ability_process_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/ams_service_startup_test/BUILD.gn b/test/unittest/ams_service_startup_test/BUILD.gn index e6d6196ac45..1ba09810280 100644 --- a/test/unittest/ams_service_startup_test/BUILD.gn +++ b/test/unittest/ams_service_startup_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/app_exit_reason_data_manager_test/BUILD.gn b/test/unittest/app_exit_reason_data_manager_test/BUILD.gn index c26ef408132..b07301aff62 100755 --- a/test/unittest/app_exit_reason_data_manager_test/BUILD.gn +++ b/test/unittest/app_exit_reason_data_manager_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024 Huawei Device Co., Ltd. +# Copyright (c) 2023-2025 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 diff --git a/test/unittest/app_mgr_service_event_handler_test/BUILD.gn b/test/unittest/app_mgr_service_event_handler_test/BUILD.gn index d3990af613f..f10ab814e2e 100644 --- a/test/unittest/app_mgr_service_event_handler_test/BUILD.gn +++ b/test/unittest/app_mgr_service_event_handler_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 diff --git a/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn b/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn index 9c76bb908df..f7de5c202a7 100644 --- a/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/unittest/app_running_processes_info_test/BUILD.gn b/test/unittest/app_running_processes_info_test/BUILD.gn index f0b3a972bc6..74ff4798688 100644 --- a/test/unittest/app_running_processes_info_test/BUILD.gn +++ b/test/unittest/app_running_processes_info_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 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 diff --git a/test/unittest/cache_process_manager_second_test/BUILD.gn b/test/unittest/cache_process_manager_second_test/BUILD.gn index b5c619b90d5..7e9b86f4e81 100644 --- a/test/unittest/cache_process_manager_second_test/BUILD.gn +++ b/test/unittest/cache_process_manager_second_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/unittest/cache_process_manager_test/BUILD.gn b/test/unittest/cache_process_manager_test/BUILD.gn index f85f3fd1b3b..a2dc318f649 100644 --- a/test/unittest/cache_process_manager_test/BUILD.gn +++ b/test/unittest/cache_process_manager_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 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 diff --git a/test/unittest/status_bar_delegate_manager_test/BUILD.gn b/test/unittest/status_bar_delegate_manager_test/BUILD.gn index 50200aaa2cb..5e7e4c26c5f 100644 --- a/test/unittest/status_bar_delegate_manager_test/BUILD.gn +++ b/test/unittest/status_bar_delegate_manager_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024 Huawei Device Co., Ltd. +# Copyright (c) 2023-2025 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 diff --git a/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn b/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn index 5e3b9c6cd9f..dafdb7a015f 100644 --- a/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn +++ b/test/unittest/ui_ability_lifecycle_manager_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024 Huawei Device Co., Ltd. +# Copyright (c) 2023-2025 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 -- Gitee