diff --git a/test/fuzztest/advancednotificationservice/BUILD.gn b/test/fuzztest/advancednotificationservice/BUILD.gn index 1d78260b641c19f5f604b23f2f994b21581eb0b7..beca8d485ba06384ced9b72442661e5f9aaf2747 100644 --- a/test/fuzztest/advancednotificationservice/BUILD.gn +++ b/test/fuzztest/advancednotificationservice/BUILD.gn @@ -21,13 +21,11 @@ group("fuzztest") { "servicesetdistributedenabledbybundle_fuzzer:ServiceSetDistributedEnabledByBundleFuzzTest", "servicesetbadgenumberfordhbybundle_fuzzer:ServiceSetBadgeNumberForDhByBundleFuzzTest", "servicesetslotflagsasbundle_fuzzer:ServiceSetSlotFlagsAsBundleFuzzTest", - "servicepublishnotificationforindirectproxy_fuzzer:ServicePublishNotificationForIndirectProxyFuzzTest", "servicegetsyncnotificationenabledwithoutapp_fuzzer:ServiceGetSyncNotificationEnabledWithoutAppFuzzTest", "servicesubscribe_fuzzer:ServiceSubscribeFuzzTest", "servicegetnotificationrequestbyhashcode_fuzzer:ServiceGetNotificationRequestByHashCodeFuzzTest", "serviceregisterpushcallback_fuzzer:ServiceRegisterPushCallbackFuzzTest", "serviceremovenotification_fuzzer:ServiceRemoveNotificationFuzzTest", - "servicegetslotsbybundle_fuzzer:ServiceGetSlotsByBundleFuzzTest", "servicepublishasbundle_fuzzer:ServicePublishAsBundleFuzzTest", "servicecancelall_fuzzer:ServiceCancelAllFuzzTest", "serviceisdistributedenabledbybundle_fuzzer:ServiceIsDistributedEnabledByBundleFuzzTest", @@ -47,12 +45,9 @@ group("fuzztest") { "servicecancelgroup_fuzzer:ServiceCancelGroupFuzzTest", "servicesetsyncnotificationenabledwithoutapp_fuzzer:ServiceSetSyncNotificationEnabledWithoutAppFuzzTest", "serviceupdateslots_fuzzer:ServiceUpdateSlotsFuzzTest", - "servicegetslots_fuzzer:ServiceGetSlotsFuzzTest", "servicegetenabledforbundleslotself_fuzzer:ServiceGetEnabledForBundleSlotSelfFuzzTest", - "servicesetnotificationbadgenum_fuzzer:ServiceSetNotificationBadgeNumFuzzTest", "serviceremoveallnotifications_fuzzer:ServiceRemoveAllNotificationsFuzzTest", "servicegetenabledforbundleslot_fuzzer:ServiceGetEnabledForBundleSlotFuzzTest", - "servicesetbadgenumberbybundle_fuzzer:ServiceSetBadgeNumberByBundleFuzzTest", "servicesethashcoderule_fuzzer:ServiceSetHashCodeRuleFuzzTest", "serviceisneedsilentindonotdisturbmode_fuzzer:ServiceIsNeedSilentInDoNotDisturbModeFuzzTest", "servicegetalldistribuedenabledbundles_fuzzer:ServiceGetAllDistribuedEnabledBundlesFuzzTest", @@ -61,20 +56,12 @@ group("fuzztest") { "servicegetdonotdisturbprofile_fuzzer:ServiceGetDoNotDisturbProfileFuzzTest", "servicecancelasbundlewithagent_fuzzer:ServiceCancelAsBundleWithAgentFuzzTest", "servicesetsmartreminderenabled_fuzzer:ServiceSetSmartReminderEnabledFuzzTest", - "serviceisspecialuserallowednotify_fuzzer:ServiceIsSpecialUserAllowedNotifyFuzzTest", "servicesetbadgenumber_fuzzer:ServiceSetBadgeNumberFuzzTest", - "servicesetnotificationsenabledforbundle_fuzzer:ServiceSetNotificationsEnabledForBundleFuzzTest", - "servicesetadditionconfig_fuzzer:ServiceSetAdditionConfigFuzzTest", - "servicesetdonotdisturbdate_fuzzer:ServiceSetDoNotDisturbDateFuzzTest", - "servicegetslotnumasbundle_fuzzer:ServiceGetSlotNumAsBundleFuzzTest", - "serviceaddslots_fuzzer:ServiceAddSlotsFuzzTest", "servicegetspecialactivenotifications_fuzzer:ServiceGetSpecialActiveNotificationsFuzzTest", - "servicegetallliveviewenabledbundles_fuzzer:ServiceGetAllLiveViewEnabledBundlesFuzzTest", "servicesetshowbadgeenabledforbundle_fuzzer:ServiceSetShowBadgeEnabledForBundleFuzzTest", "servicedisablenotificationfeature_fuzzer:ServiceDisableNotificationFeatureFuzzTest", "servicecancel_fuzzer:ServiceCancelFuzzTest", "servicereplydistributeoperation_fuzzer:ServiceReplyDistributeOperationFuzzTest", - "servicegetdonotdisturbdate_fuzzer:ServiceGetDoNotDisturbDateFuzzTest", "servicesettargetdevicestatus_fuzzer:ServiceSetTargetDeviceStatusFuzzTest", "servicesetenabledforbundleslot_fuzzer:ServiceSetEnabledForBundleSlotFuzzTest", "serviceremovedonotdisturbprofiles_fuzzer:ServiceRemoveDoNotDisturbProfilesFuzzTest", @@ -91,19 +78,5 @@ group("fuzztest") { "servicedeletebybundle_fuzzer:ServiceDeleteByBundleFuzzTest", "servicegetallnotificationsbyslottype_fuzzer:ServiceGetAllNotificationsBySlotTypeFuzzTest", "servicepublishasbundlewithmaxcapacity_fuzzer:ServicePublishAsBundleWithMaxCapacityFuzzTest", - "servicegettargetdevicestatus_fuzzer:ServiceGetTargetDeviceStatusFuzzTest", - "servicegetactivenotificationbyfilter_fuzzer:ServiceGetActiveNotificationByFilterFuzzTest", - "servicegetslotbytype_fuzzer:ServiceGetSlotByTypeFuzzTest", - "servicerequestenablenotification_fuzzer:ServiceRequestEnableNotificationFuzzTest", - "servicegetslotflagsasbundle_fuzzer:ServiceGetSlotFlagsAsBundleFuzzTest", - "servicetriggerlocalliveview_fuzzer:ServiceTriggerLocalLiveViewFuzzTest", - "serviceallowusereminder_fuzzer:ServiceAllowUseReminderFuzzTest", - "serviceisspecialbundleallowednotify_fuzzer:ServiceIsSpecialBundleAllowedNotifyFuzzTest", - "serviceremoveslotbytype_fuzzer:ServiceRemoveSlotByTypeFuzzTest", - "servicecancelasbundle_fuzzer:ServiceCancelAsBundleFuzzTest", - "serviceaddslotbytype_fuzzer:ServiceAddSlotByTypeFuzzTest", - "serviceupdatenotificationtimerbyuid_fuzzer:ServiceUpdateNotificationTimerByUidFuzzTest", - "serviceisdistributedenabledbyslot_fuzzer:ServiceIsDistributedEnabledBySlotFuzzTest", - "serviceremovedistributednotifications_fuzzer:ServiceRemoveDistributedNotificationsFuzzTest", ] } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/BUILD.gn deleted file mode 100644 index 434900cb120937dccbbef9eb87d5d79afdb6fec8..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceAddSlotByTypeFuzzTest") { - sources_value = [ "service_addslotbytype_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceAddSlotByTypeFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/service_addslotbytype_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/service_addslotbytype_fuzzer.cpp deleted file mode 100644 index e9f337907c87bf84f58e8fc8e52d146916937422..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/service_addslotbytype_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_addslotbytype_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/service_addslotbytype_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/service_addslotbytype_fuzzer.h deleted file mode 100644 index 821c09e94ad8074e14d12a3b01a55a43c3abd407..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslotbytype_fuzzer/service_addslotbytype_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ADDSLOTBYTYPE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ADDSLOTBYTYPE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceaddslotbytype_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ADDSLOTBYTYPE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/BUILD.gn deleted file mode 100644 index 0d3f5912bd7a8b54643c3b10aa7885732161cb11..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceAddSlotsFuzzTest") { - sources_value = [ "service_addslots_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceAddSlotsFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/service_addslots_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/service_addslots_fuzzer.cpp deleted file mode 100644 index c6e81bdc7949f214f9d28dabd4ee0cabb917769e..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/service_addslots_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_addslots_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/service_addslots_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/service_addslots_fuzzer.h deleted file mode 100644 index 61bf0bfad8dde5aee9193027fc1cc5f90bdd77ca..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceaddslots_fuzzer/service_addslots_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ADDSLOTS_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ADDSLOTS_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceaddslots_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ADDSLOTS_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/BUILD.gn deleted file mode 100644 index 042e3ef7b47608ddde170ac551c1789e7323d6bb..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceAllowUseReminderFuzzTest") { - sources_value = [ "service_allowusereminder_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceAllowUseReminderFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/service_allowusereminder_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/service_allowusereminder_fuzzer.cpp deleted file mode 100644 index 5a8bc01e7fef09b06d56b6690692f0f115386513..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/service_allowusereminder_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_allowusereminder_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/service_allowusereminder_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/service_allowusereminder_fuzzer.h deleted file mode 100644 index 067be7b7589556498f775ecd831b049a3be06acc..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceallowusereminder_fuzzer/service_allowusereminder_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ALLOWUSEREMINDER_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ALLOWUSEREMINDER_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceallowusereminder_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ALLOWUSEREMINDER_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/BUILD.gn deleted file mode 100644 index bd95f631a8731e3135533db0302a5b0a0d3a9d17..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceCancelAsBundleFuzzTest") { - sources_value = [ "service_cancelasbundle_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceCancelAsBundleFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/service_cancelasbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/service_cancelasbundle_fuzzer.cpp deleted file mode 100644 index ddae103e7da684b956658b77087e41550128b08e..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/service_cancelasbundle_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_cancelasbundle_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/service_cancelasbundle_fuzzer.h b/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/service_cancelasbundle_fuzzer.h deleted file mode 100644 index 16db997cf48b2747171f5d1a28e675cf22547c06..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicecancelasbundle_fuzzer/service_cancelasbundle_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_CANCELASBUNDLE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_CANCELASBUNDLE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicecancelasbundle_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_CANCELASBUNDLE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/BUILD.gn deleted file mode 100644 index 3bee6856fd68e9a4fa7858376fcac7f25eabf2f8..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetActiveNotificationByFilterFuzzTest") { - sources_value = [ "service_getactivenotificationbyfilter_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetActiveNotificationByFilterFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/service_getactivenotificationbyfilter_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/service_getactivenotificationbyfilter_fuzzer.cpp deleted file mode 100644 index 9ddf5e7a2efe39c1d9f67777cdacf98eb553e8b6..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/service_getactivenotificationbyfilter_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getactivenotificationbyfilter_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/service_getactivenotificationbyfilter_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/service_getactivenotificationbyfilter_fuzzer.h deleted file mode 100644 index 290025e59cda274b98847ef24de39bc6f43e8ba1..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetactivenotificationbyfilter_fuzzer/service_getactivenotificationbyfilter_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETACTIVENOTIFICATIONBYFILTER_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETACTIVENOTIFICATIONBYFILTER_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetactivenotificationbyfilter_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETACTIVENOTIFICATIONBYFILTER_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/BUILD.gn deleted file mode 100644 index e9911463dd16dc441a8630d650f955b9f2ed0861..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetAllLiveViewEnabledBundlesFuzzTest") { - sources_value = [ "service_getallliveviewenabledbundles_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetAllLiveViewEnabledBundlesFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/service_getallliveviewenabledbundles_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/service_getallliveviewenabledbundles_fuzzer.cpp deleted file mode 100644 index d1a1e0fd42830dd8cd2e2d1adbd027680f434888..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/service_getallliveviewenabledbundles_fuzzer.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getallliveviewenabledbundles_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - auto service = AdvancedNotificationService::GetInstance(); - - std::vector bundleOption; - service->GetAllLiveViewEnabledBundles(bundleOption); - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - std::vector requestPermission = { - OHOS::Notification::OHOS_PERMISSION_NOTIFICATION_CONTROLLER, - OHOS::Notification::OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER, - OHOS::Notification::OHOS_PERMISSION_SET_UNREMOVABLE_NOTIFICATION - }; - MockRandomToken(&fdp, requestPermission); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/service_getallliveviewenabledbundles_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/service_getallliveviewenabledbundles_fuzzer.h deleted file mode 100644 index 6e6d0fefe82911c488565423c3482842b9476d46..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetallliveviewenabledbundles_fuzzer/service_getallliveviewenabledbundles_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETALLLIVEVIEWENABLEDBUNDLES_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETALLLIVEVIEWENABLEDBUNDLES_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetallliveviewenabledbundles_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETALLLIVEVIEWENABLEDBUNDLES_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp index fed9e36b5e653a24280a52958ada2494add17e97..686f8e5da551a845707a7f03c2376a2a64decde7 100644 --- a/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp @@ -24,8 +24,7 @@ namespace Notification { bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) { auto service = AdvancedNotificationService::GetInstance(); - - int32_t importance = 0; + int32_t importance = fuzzData->ConsumeIntegral(); service->GetBundleImportance(importance); return true; } diff --git a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/BUILD.gn deleted file mode 100644 index 97b8f7aea3fb5cfa8f834cdc29c404c7cbf78b04..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetDoNotDisturbDateFuzzTest") { - sources_value = [ "service_getdonotdisturbdate_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetDoNotDisturbDateFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/service_getdonotdisturbdate_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/service_getdonotdisturbdate_fuzzer.cpp deleted file mode 100644 index c8234283e3ffcb341460a283590f4c18c0d8efe0..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/service_getdonotdisturbdate_fuzzer.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getdonotdisturbdate_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - auto service = AdvancedNotificationService::GetInstance(); - - sptr date; - service->GetDoNotDisturbDate(date); - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - std::vector requestPermission = { - OHOS::Notification::OHOS_PERMISSION_NOTIFICATION_CONTROLLER, - OHOS::Notification::OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER, - OHOS::Notification::OHOS_PERMISSION_SET_UNREMOVABLE_NOTIFICATION - }; - MockRandomToken(&fdp, requestPermission); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/service_getdonotdisturbdate_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/service_getdonotdisturbdate_fuzzer.h deleted file mode 100644 index 35c335ea0ee3e8f69d4a7d0ad668becbdd3e699f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbdate_fuzzer/service_getdonotdisturbdate_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETDONOTDISTURBDATE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETDONOTDISTURBDATE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetdonotdisturbdate_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETDONOTDISTURBDATE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/BUILD.gn deleted file mode 100644 index c81944996e814d35551c595b65f78a11a8b895f1..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetSlotByTypeFuzzTest") { - sources_value = [ "service_getslotbytype_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetSlotByTypeFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/service_getslotbytype_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/service_getslotbytype_fuzzer.cpp deleted file mode 100644 index 78e94faeb9fa856de5b155de38287a1b34f62e71..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/service_getslotbytype_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getslotbytype_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/service_getslotbytype_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/service_getslotbytype_fuzzer.h deleted file mode 100644 index 2d983a905aa6470183bea41ca0d659d1c4ecfcae..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotbytype_fuzzer/service_getslotbytype_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTBYTYPE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTBYTYPE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetslotbytype_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTBYTYPE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/BUILD.gn deleted file mode 100644 index d07bce0ff3df9e52241398c67517ac0a083ae457..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetSlotFlagsAsBundleFuzzTest") { - sources_value = [ "service_getslotflagsasbundle_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetSlotFlagsAsBundleFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/service_getslotflagsasbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/service_getslotflagsasbundle_fuzzer.cpp deleted file mode 100644 index f7678c9b476ac4bf8d3e9bfefba0bcaf2fd0142e..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/service_getslotflagsasbundle_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getslotflagsasbundle_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/service_getslotflagsasbundle_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/service_getslotflagsasbundle_fuzzer.h deleted file mode 100644 index 9e8c906c06988072dee66a5d9d5b145de687b63a..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotflagsasbundle_fuzzer/service_getslotflagsasbundle_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTFLAGSASBUNDLE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTFLAGSASBUNDLE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetslotflagsasbundle_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTFLAGSASBUNDLE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/BUILD.gn deleted file mode 100644 index 4b0c36317cecbf5ccd451b385a672f8dcd1d19be..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetSlotNumAsBundleFuzzTest") { - sources_value = [ "service_getslotnumasbundle_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetSlotNumAsBundleFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/service_getslotnumasbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/service_getslotnumasbundle_fuzzer.cpp deleted file mode 100644 index 413992351f0e5e93c1dbbe2876bfb6e0e2377ac0..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/service_getslotnumasbundle_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getslotnumasbundle_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/service_getslotnumasbundle_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/service_getslotnumasbundle_fuzzer.h deleted file mode 100644 index 9cfba785fdf3a424d82c99f52b6485c83c67def5..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotnumasbundle_fuzzer/service_getslotnumasbundle_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTNUMASBUNDLE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTNUMASBUNDLE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetslotnumasbundle_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTNUMASBUNDLE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/BUILD.gn deleted file mode 100644 index 27fd2cb236e5923f3fe9629b4523a4804e65a0db..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetSlotsFuzzTest") { - sources_value = [ "service_getslots_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetSlotsFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/service_getslots_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/service_getslots_fuzzer.cpp deleted file mode 100644 index ce37f1108c5d53bba3559b42c3983ecb218eef2a..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/service_getslots_fuzzer.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getslots_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" -#include "notification_slot.h" - -#include - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - auto service = AdvancedNotificationService::GetInstance(); - std::vector> slots; - service->GetSlots(slots); - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - std::vector requestPermission = { - OHOS::Notification::OHOS_PERMISSION_NOTIFICATION_CONTROLLER, - OHOS::Notification::OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER, - OHOS::Notification::OHOS_PERMISSION_SET_UNREMOVABLE_NOTIFICATION - }; - MockRandomToken(&fdp, requestPermission); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/service_getslots_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/service_getslots_fuzzer.h deleted file mode 100644 index ef2854289834cd79f73c263b126f284016c093e1..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslots_fuzzer/service_getslots_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTS_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTS_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetslots_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTS_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/BUILD.gn deleted file mode 100644 index 58731cc0a60799962c7e1e46eaa6bc35bd761642..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetSlotsByBundleFuzzTest") { - sources_value = [ "service_getslotsbybundle_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetSlotsByBundleFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/service_getslotsbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/service_getslotsbybundle_fuzzer.cpp deleted file mode 100644 index 136a30d5fd41ce05d059f6e3a17d9b31210943d0..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/service_getslotsbybundle_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_getslotsbybundle_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/service_getslotsbybundle_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/service_getslotsbybundle_fuzzer.h deleted file mode 100644 index d919a935638537ba644a54e73928dd9ca907008c..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegetslotsbybundle_fuzzer/service_getslotsbybundle_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTSBYBUNDLE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTSBYBUNDLE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegetslotsbybundle_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETSLOTSBYBUNDLE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/BUILD.gn deleted file mode 100644 index 8d6c4b7b798c3d8d7157b23fb81f8044f730a1a7..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceGetTargetDeviceStatusFuzzTest") { - sources_value = [ "service_gettargetdevicestatus_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceGetTargetDeviceStatusFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/service_gettargetdevicestatus_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/service_gettargetdevicestatus_fuzzer.cpp deleted file mode 100644 index d0c2626b1a963952eea9593676b9165f80f1c6f4..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/service_gettargetdevicestatus_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_gettargetdevicestatus_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/service_gettargetdevicestatus_fuzzer.h b/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/service_gettargetdevicestatus_fuzzer.h deleted file mode 100644 index b6d4d4a6263130d58ed12723108863f17c90f8de..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicegettargetdevicestatus_fuzzer/service_gettargetdevicestatus_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETTARGETDEVICESTATUS_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETTARGETDEVICESTATUS_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicegettargetdevicestatus_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_GETTARGETDEVICESTATUS_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/BUILD.gn deleted file mode 100644 index f097369d6ae4aea2903233ecccd27fd23eb98115..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceIsDistributedEnabledBySlotFuzzTest") { - sources_value = [ "service_isdistributedenabledbyslot_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceIsDistributedEnabledBySlotFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/service_isdistributedenabledbyslot_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/service_isdistributedenabledbyslot_fuzzer.cpp deleted file mode 100644 index 7bd99e8166bdd9bbf35bca9adf2ff52a0e066eb2..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/service_isdistributedenabledbyslot_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_isdistributedenabledbyslot_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/service_isdistributedenabledbyslot_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/service_isdistributedenabledbyslot_fuzzer.h deleted file mode 100644 index c1a5c4f7ec416498835a61f40811508ea9856fd7..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbyslot_fuzzer/service_isdistributedenabledbyslot_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISDISTRIBUTEDENABLEDBYSLOT_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISDISTRIBUTEDENABLEDBYSLOT_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceisdistributedenabledbyslot_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISDISTRIBUTEDENABLEDBYSLOT_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/BUILD.gn deleted file mode 100644 index 8291e70b69d2721625fc38d4930be514aa555a5f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceIsSpecialBundleAllowedNotifyFuzzTest") { - sources_value = [ "service_isspecialbundleallowednotify_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceIsSpecialBundleAllowedNotifyFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/service_isspecialbundleallowednotify_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/service_isspecialbundleallowednotify_fuzzer.cpp deleted file mode 100644 index 190c6953ad051ee6cb305990235f48d2420a6efa..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/service_isspecialbundleallowednotify_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_isspecialbundleallowednotify_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/service_isspecialbundleallowednotify_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/service_isspecialbundleallowednotify_fuzzer.h deleted file mode 100644 index ec805bb4b2c8352b8d8e9be833c06efaf63ff8e1..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialbundleallowednotify_fuzzer/service_isspecialbundleallowednotify_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISSPECIALBUNDLEALLOWEDNOTIFY_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISSPECIALBUNDLEALLOWEDNOTIFY_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceisspecialbundleallowednotify_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISSPECIALBUNDLEALLOWEDNOTIFY_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/BUILD.gn deleted file mode 100644 index bc8e0f2ac60214a473ca35d485b8a1b3838f15d0..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceIsSpecialUserAllowedNotifyFuzzTest") { - sources_value = [ "service_isspecialuserallowednotify_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceIsSpecialUserAllowedNotifyFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/service_isspecialuserallowednotify_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/service_isspecialuserallowednotify_fuzzer.cpp deleted file mode 100644 index ac4bd43453cf9300c0c3753c61adecb1d801814e..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/service_isspecialuserallowednotify_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_isspecialuserallowednotify_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/service_isspecialuserallowednotify_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/service_isspecialuserallowednotify_fuzzer.h deleted file mode 100644 index bd0aacc60a2a195db7053b361bd1e4f13a1358b5..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceisspecialuserallowednotify_fuzzer/service_isspecialuserallowednotify_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISSPECIALUSERALLOWEDNOTIFY_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISSPECIALUSERALLOWEDNOTIFY_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceisspecialuserallowednotify_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_ISSPECIALUSERALLOWEDNOTIFY_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/BUILD.gn deleted file mode 100644 index b6655181ba572cd23b5fd37d5beb427de008c8c2..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServicePublishNotificationForIndirectProxyFuzzTest") { - sources_value = [ "service_publishnotificationforindirectproxy_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServicePublishNotificationForIndirectProxyFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/service_publishnotificationforindirectproxy_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/service_publishnotificationforindirectproxy_fuzzer.cpp deleted file mode 100644 index 5aafc6827343f5dcc988d7e93648c0b84bc0c278..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/service_publishnotificationforindirectproxy_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_publishnotificationforindirectproxy_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/service_publishnotificationforindirectproxy_fuzzer.h b/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/service_publishnotificationforindirectproxy_fuzzer.h deleted file mode 100644 index c10c33458bd557ddb1d164d4258e6c3a4f57b6b9..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicepublishnotificationforindirectproxy_fuzzer/service_publishnotificationforindirectproxy_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_PUBLISHNOTIFICATIONFORINDIRECTPROXY_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_PUBLISHNOTIFICATIONFORINDIRECTPROXY_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicepublishnotificationforindirectproxy_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_PUBLISHNOTIFICATIONFORINDIRECTPROXY_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/BUILD.gn deleted file mode 100644 index 04ab055a063e0c1b77e2c3cd2def110a06470a54..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceRemoveDistributedNotificationsFuzzTest") { - sources_value = [ "service_removedistributednotifications_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceRemoveDistributedNotificationsFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/service_removedistributednotifications_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/service_removedistributednotifications_fuzzer.cpp deleted file mode 100644 index 9152e6dd54e3803a39c99b7a2b200e81d8bc288c..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/service_removedistributednotifications_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_removedistributednotifications_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/service_removedistributednotifications_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/service_removedistributednotifications_fuzzer.h deleted file mode 100644 index aee6e9338205c9348614bf38bc2e8eab37cdf31d..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremovedistributednotifications_fuzzer/service_removedistributednotifications_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REMOVEDISTRIBUTEDNOTIFICATIONS_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REMOVEDISTRIBUTEDNOTIFICATIONS_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceremovedistributednotifications_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REMOVEDISTRIBUTEDNOTIFICATIONS_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/BUILD.gn deleted file mode 100644 index b35b29f92313d8d02d9f80e6a0390a016e0a3e11..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceRemoveSlotByTypeFuzzTest") { - sources_value = [ "service_removeslotbytype_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceRemoveSlotByTypeFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/service_removeslotbytype_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/service_removeslotbytype_fuzzer.cpp deleted file mode 100644 index 4564b2a6ba169ebefbd3f4444819cc6d8d7251eb..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/service_removeslotbytype_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_removeslotbytype_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/service_removeslotbytype_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/service_removeslotbytype_fuzzer.h deleted file mode 100644 index 76c4cd3853446b3852afc710d3779ce7bd381436..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceremoveslotbytype_fuzzer/service_removeslotbytype_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REMOVESLOTBYTYPE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REMOVESLOTBYTYPE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceremoveslotbytype_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REMOVESLOTBYTYPE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/BUILD.gn deleted file mode 100644 index 4903f70cb4e1ea7eecfdc0c5bdaa06516446c2e9..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceRequestEnableNotificationFuzzTest") { - sources_value = [ "service_requestenablenotification_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceRequestEnableNotificationFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/service_requestenablenotification_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/service_requestenablenotification_fuzzer.cpp deleted file mode 100644 index 49d9e41e69c3618e223651ae8ab9d6f263fc8300..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/service_requestenablenotification_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_requestenablenotification_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/service_requestenablenotification_fuzzer.h b/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/service_requestenablenotification_fuzzer.h deleted file mode 100644 index d62aac6125f1bf6e02d8caa4c23333245f5ed3e6..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicerequestenablenotification_fuzzer/service_requestenablenotification_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REQUESTENABLENOTIFICATION_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REQUESTENABLENOTIFICATION_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicerequestenablenotification_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_REQUESTENABLENOTIFICATION_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/BUILD.gn deleted file mode 100644 index 47959412e292ced5b744e017d684e2b1991d2a93..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceSetAdditionConfigFuzzTest") { - sources_value = [ "service_setadditionconfig_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceSetAdditionConfigFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/service_setadditionconfig_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/service_setadditionconfig_fuzzer.cpp deleted file mode 100644 index 81d75e4cd18ee92a03165216ac65f2bb06aa71ec..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/service_setadditionconfig_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_setadditionconfig_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/service_setadditionconfig_fuzzer.h b/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/service_setadditionconfig_fuzzer.h deleted file mode 100644 index c055c79107ca1e1fb7920668af203a408263ee3e..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetadditionconfig_fuzzer/service_setadditionconfig_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETADDITIONCONFIG_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETADDITIONCONFIG_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicesetadditionconfig_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETADDITIONCONFIG_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/BUILD.gn deleted file mode 100644 index f7a64b3f732431f6f744e9bacf2f5c072cd3ef4f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceSetBadgeNumberByBundleFuzzTest") { - sources_value = [ "service_setbadgenumberbybundle_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceSetBadgeNumberByBundleFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/service_setbadgenumberbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/service_setbadgenumberbybundle_fuzzer.cpp deleted file mode 100644 index a8124318ca74566662e361176dff9d0295334fa4..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/service_setbadgenumberbybundle_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_setbadgenumberbybundle_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/service_setbadgenumberbybundle_fuzzer.h b/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/service_setbadgenumberbybundle_fuzzer.h deleted file mode 100644 index 1f577f50ab5e8d0abc97cdc7746d632200ec0c52..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumberbybundle_fuzzer/service_setbadgenumberbybundle_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETBADGENUMBERBYBUNDLE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETBADGENUMBERBYBUNDLE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicesetbadgenumberbybundle_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETBADGENUMBERBYBUNDLE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/BUILD.gn deleted file mode 100644 index f080fce9bc79dabff47a5648896db24f5141cec9..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceSetDoNotDisturbDateFuzzTest") { - sources_value = [ "service_setdonotdisturbdate_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceSetDoNotDisturbDateFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/service_setdonotdisturbdate_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/service_setdonotdisturbdate_fuzzer.cpp deleted file mode 100644 index 607e56a4ba5e36064b2f10962574ef682eeb9df6..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/service_setdonotdisturbdate_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_setdonotdisturbdate_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/service_setdonotdisturbdate_fuzzer.h b/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/service_setdonotdisturbdate_fuzzer.h deleted file mode 100644 index 1dbb94705c9fe55331721f03e5b56a7c83a72f89..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetdonotdisturbdate_fuzzer/service_setdonotdisturbdate_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETDONOTDISTURBDATE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETDONOTDISTURBDATE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicesetdonotdisturbdate_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETDONOTDISTURBDATE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/BUILD.gn deleted file mode 100644 index 578f3604babbc7fda30fe09b7abe865317342320..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceSetNotificationBadgeNumFuzzTest") { - sources_value = [ "service_setnotificationbadgenum_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceSetNotificationBadgeNumFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/service_setnotificationbadgenum_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/service_setnotificationbadgenum_fuzzer.cpp deleted file mode 100644 index 9dab544e4270e44c79c5bcb77fb8d8310e128b72..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/service_setnotificationbadgenum_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_setnotificationbadgenum_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/service_setnotificationbadgenum_fuzzer.h b/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/service_setnotificationbadgenum_fuzzer.h deleted file mode 100644 index b617aa2c5dffe888203d8cc3099abdb6b1534b64..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationbadgenum_fuzzer/service_setnotificationbadgenum_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETNOTIFICATIONBADGENUM_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETNOTIFICATIONBADGENUM_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicesetnotificationbadgenum_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETNOTIFICATIONBADGENUM_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/BUILD.gn deleted file mode 100644 index 2b359a488f594eca964b8a8070136ffab1830cf5..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceSetNotificationsEnabledForBundleFuzzTest") { - sources_value = [ "service_setnotificationsenabledforbundle_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceSetNotificationsEnabledForBundleFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/service_setnotificationsenabledforbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/service_setnotificationsenabledforbundle_fuzzer.cpp deleted file mode 100644 index e7b0cd253d2b12ec4c193684eafcefd3be90e141..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/service_setnotificationsenabledforbundle_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_setnotificationsenabledforbundle_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/service_setnotificationsenabledforbundle_fuzzer.h b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/service_setnotificationsenabledforbundle_fuzzer.h deleted file mode 100644 index 7c836ece2fa79c582a087c005aa5ecbfbf477dd4..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforbundle_fuzzer/service_setnotificationsenabledforbundle_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETNOTIFICATIONSENABLEDFORBUNDLE_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETNOTIFICATIONSENABLEDFORBUNDLE_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicesetnotificationsenabledforbundle_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_SETNOTIFICATIONSENABLEDFORBUNDLE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/BUILD.gn deleted file mode 100644 index 1693219724ee0960433cdab7a2819bc6e05239e3..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceTriggerLocalLiveViewFuzzTest") { - sources_value = [ "service_triggerlocalliveview_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceTriggerLocalLiveViewFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/service_triggerlocalliveview_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/service_triggerlocalliveview_fuzzer.cpp deleted file mode 100644 index f2271c6a8ae4548c776d667a72ff53b46bdcb658..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/service_triggerlocalliveview_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_triggerlocalliveview_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/service_triggerlocalliveview_fuzzer.h b/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/service_triggerlocalliveview_fuzzer.h deleted file mode 100644 index 30095113ed16a62db5464a2a7bb52b7d8d73f9ec..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/servicetriggerlocalliveview_fuzzer/service_triggerlocalliveview_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_TRIGGERLOCALLIVEVIEW_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_TRIGGERLOCALLIVEVIEW_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationservicetriggerlocalliveview_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_TRIGGERLOCALLIVEVIEW_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/BUILD.gn deleted file mode 100644 index 48db1e51f41cfe1d58a564e753ee7b2373b1fd21..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -#####################hydra-fuzz################### -import("../advancednotificationservice_fuzztest_common.gni") # 导入公共配置 - -##############################fuzztest########################################## -advancednotificationservice_fuzztest_target("ServiceUpdateNotificationTimerByUidFuzzTest") { - sources_value = [ "service_updatenotificationtimerbyuid_fuzzer.cpp" ] - fuzz_config_file_value = - "${component_path}/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer" - deps_value = [] # 如果不需要额外依赖,可以留空 - common_deps_value = common_deps # 使用公共依赖 -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [ ":ServiceUpdateNotificationTimerByUidFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/corpus/init b/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/corpus/init deleted file mode 100644 index d9719cafab50ed61d354cfa865b56390a0df320f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/corpus/init +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -FUZZ \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/project.xml b/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/project.xml deleted file mode 100644 index 226522bd2ad3eaf2db4f710f1924d82d2912c235..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 10000 - - 300 - - 4096 - - diff --git a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/service_updatenotificationtimerbyuid_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/service_updatenotificationtimerbyuid_fuzzer.cpp deleted file mode 100644 index 2658091199567f9aa8949132d3089b0ae85de74f..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/service_updatenotificationtimerbyuid_fuzzer.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "service_updatenotificationtimerbyuid_fuzzer.h" - -#include -#include "advanced_notification_service.h" -#include "ans_permission_def.h" -#include "mock_notification_request.h" - -namespace OHOS { -namespace Notification { - bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fuzzData) - { - return true; - } -} -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - FuzzedDataProvider fdp(data, size); - OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); - return 0; -} diff --git a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/service_updatenotificationtimerbyuid_fuzzer.h b/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/service_updatenotificationtimerbyuid_fuzzer.h deleted file mode 100644 index 15a2024218206aa1944d8fcab8844220c19e9f5c..0000000000000000000000000000000000000000 --- a/test/fuzztest/advancednotificationservice/serviceupdatenotificationtimerbyuid_fuzzer/service_updatenotificationtimerbyuid_fuzzer.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_UPDATENOTIFICATIONTIMERBYUID_FUZZER_H -#define TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_UPDATENOTIFICATIONTIMERBYUID_FUZZER_H - -#include "fuzz_common_base.h" -#include - -#define FUZZ_PROJECT_NAME "advancednotificationserviceupdatenotificationtimerbyuid_fuzzer" - -#endif // TEST_FUZZTEST_ADVANCEDNOTIFICATIONSERVICE_FUZZER_SERVICE_UPDATENOTIFICATIONTIMERBYUID_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/notificationmediacontent_fuzzer/notificationmediacontent_fuzzer.cpp b/test/fuzztest/notificationmediacontent_fuzzer/notificationmediacontent_fuzzer.cpp index e0b12fea9d4fe2521178da35fcdc50308868b172..986e82041072e4ed220080c1bfb41f1dfc1688c5 100644 --- a/test/fuzztest/notificationmediacontent_fuzzer/notificationmediacontent_fuzzer.cpp +++ b/test/fuzztest/notificationmediacontent_fuzzer/notificationmediacontent_fuzzer.cpp @@ -30,6 +30,8 @@ namespace OHOS { notificationMediaContent.SetAVToken(avToken); // test SetShownActions function std::vector actions; + uint32_t action = fdp->ConsumeIntegral(); + actions.push_back(action); notificationMediaContent.SetShownActions(actions); // test GetAVToken function notificationMediaContent.GetAVToken(); diff --git a/test/fuzztest/notificationnormalcontent_fuzzer/notificationnormalcontent_fuzzer.cpp b/test/fuzztest/notificationnormalcontent_fuzzer/notificationnormalcontent_fuzzer.cpp index c85307ddcb20e6ba430d5a977565710063ac7fdc..ad894aab589766b9ba132b88bd413d1d89c97180 100644 --- a/test/fuzztest/notificationnormalcontent_fuzzer/notificationnormalcontent_fuzzer.cpp +++ b/test/fuzztest/notificationnormalcontent_fuzzer/notificationnormalcontent_fuzzer.cpp @@ -25,6 +25,8 @@ namespace OHOS { bool DoSomethingInterestingWithMyAPI(FuzzedDataProvider *fdp) { Notification::NotificationNormalContent notificationNormalContent; + std::string stringData = fdp->ConsumeRandomLengthString(); + notificationNormalContent.SetTitle(stringData); // test Dump function notificationNormalContent.Dump(); // test ToJson function