diff --git a/ressched/sched_controller/test/fuzztest/resschedobserver_fuzzer/resschedobserver_fuzzer.cpp b/ressched/sched_controller/test/fuzztest/resschedobserver_fuzzer/resschedobserver_fuzzer.cpp index 00c96a093d2f0fd48855e963e8f2b4cf258eeedd..6cc92a8926075a05221757ba2cabfc3a1e11426d 100644 --- a/ressched/sched_controller/test/fuzztest/resschedobserver_fuzzer/resschedobserver_fuzzer.cpp +++ b/ressched/sched_controller/test/fuzztest/resschedobserver_fuzzer/resschedobserver_fuzzer.cpp @@ -31,17 +31,15 @@ #include "download_upload_observer.h" #endif -#ifdef RESOURCE_SCHEDULE_SERVICE_WITH_APP_NAP_ENABLE +#ifdef RESOURCE_SCHEDULE_SERVICE_HISYSEVENT_ENABLE #include "hisysevent_observer.h" #endif #include "observer_manager.h" #include "system_ability_definition.h" #include "res_sched_service.h" #ifdef MMI_ENABLE -#ifdef RESOURCE_SCHEDULE_SERVICE_WITH_APP_NAP_ENABLE #include "mmi_observer.h" #endif -#endif #include "connection_subscriber.h" #include "fold_display_mode_observer.h" #include "av_session_state_listener.h" @@ -69,7 +67,7 @@ namespace { static const int32_t THREE_PARAMETERS = 3; static const int32_t FOUR_PARAMETERS = 4; static const int32_t FIVE_PARAMETERS = 5; -#ifdef RESOURCE_SCHEDULE_SERVICE_WITH_APP_NAP_ENABLE +#ifdef RESOURCE_SCHEDULE_SERVICE_HISYSEVENT_ENABLE static const int32_t SIX_PARAMETERS = 6; const int32_t INDENT = -1; #endif @@ -143,7 +141,7 @@ namespace { return str; } -#ifdef RESOURCE_SCHEDULE_SERVICE_WITH_APP_NAP_ENABLE +#ifdef RESOURCE_SCHEDULE_SERVICE_HISYSEVENT_ENABLE bool HisysEventAvCodecEventFuzzTest(const uint8_t* data, size_t size) { if (data == nullptr) { @@ -269,6 +267,7 @@ namespace { hisysEventObserver_->ProcessHiSysEvent(eventName, sysEvent); return true; } +#endif #ifdef MMI_ENABLE bool ObserverManagerFuzzTest(const uint8_t* data, size_t size) @@ -292,6 +291,7 @@ namespace { } #endif +#ifdef RESOURCE_SCHEDULE_SERVICE_HISYSEVENT_ENABLE bool HisysEventOnEventFuzzTest(const uint8_t* data, size_t size) { if (data == nullptr) { @@ -331,6 +331,7 @@ namespace { hisysEventObserver_->OnServiceDied(); return true; } +#endif #ifdef MMI_ENABLE bool MmiObserverSyncBundleNameFuzzTest(const uint8_t* data, size_t size) @@ -356,7 +357,6 @@ namespace { mmiObserver->SyncBundleName(pid, uid, bundleName, syncStatus); return true; } -#endif #endif bool ConnectionSubscriberExtensionFuzzTest(const uint8_t* data, size_t size) @@ -658,18 +658,18 @@ namespace { extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { OHOS::ResourceSchedule::SetGPos(); -#ifdef RESOURCE_SCHEDULE_SERVICE_WITH_APP_NAP_ENABLE +#ifdef RESOURCE_SCHEDULE_SERVICE_HISYSEVENT_ENABLE OHOS::ResourceSchedule::HisysEventAvCodecEventFuzzTest(data, size); OHOS::ResourceSchedule::HisysEventRunningLockEventFuzzTest(data, size); OHOS::ResourceSchedule::HisysEventCameraEventFuzzTest(data, size); OHOS::ResourceSchedule::HisysEventWifiEventFuzzTest(data, size); OHOS::ResourceSchedule::ProcessHiSysEventFuzzTest(data, size); + OHOS::ResourceSchedule::HisysEventOnEventFuzzTest(data, size); + OHOS::ResourceSchedule::HiSysEventOnServiceDiedFuzzTest(data, size); +#endif #ifdef MMI_ENABLE OHOS::ResourceSchedule::ObserverManagerFuzzTest(data, size); OHOS::ResourceSchedule::MmiObserverSyncBundleNameFuzzTest(data, size); -#endif - OHOS::ResourceSchedule::HisysEventOnEventFuzzTest(data, size); - OHOS::ResourceSchedule::HiSysEventOnServiceDiedFuzzTest(data, size); #endif OHOS::ResourceSchedule::ConnectionSubscriberExtensionFuzzTest(data, size); OHOS::ResourceSchedule::ConnectionSubscriberDlpAbilityFuzzTest(data, size);