From 0e9f1fa2ddb6d48d799e75a3447bdb78c1aac6cf Mon Sep 17 00:00:00 2001 From: wangdi Date: Mon, 1 Sep 2025 20:51:53 +0800 Subject: [PATCH] fuzz sleep 1s Signed-off-by: wangdi --- .../service_adddonotdisturbprofiles_fuzzer.cpp | 2 ++ .../servicecancel_fuzzer/service_cancel_fuzzer.cpp | 2 ++ .../servicecancelall_fuzzer/service_cancelall_fuzzer.cpp | 2 ++ .../service_cancelasbundlewithagent_fuzzer.cpp | 2 ++ .../service_cancelcontinuoustasknotification_fuzzer.cpp | 2 ++ .../servicecancelgroup_fuzzer/service_cancelgroup_fuzzer.cpp | 2 ++ .../service_canpopenablenotificationdialog_fuzzer.cpp | 2 ++ .../service_canpublishasbundle_fuzzer.cpp | 2 ++ .../servicedelete_fuzzer/service_delete_fuzzer.cpp | 2 ++ .../service_deleteallbyuser_fuzzer.cpp | 2 ++ .../service_deletebybundle_fuzzer.cpp | 2 ++ .../service_disablenotificationfeature_fuzzer.cpp | 2 ++ .../service_distributeoperation_fuzzer.cpp | 2 ++ .../service_enabledistributedbybundle_fuzzer.cpp | 2 ++ .../service_getactivenotifications_fuzzer.cpp | 2 ++ .../service_getalldistribuedenabledbundles_fuzzer.cpp | 2 ++ .../service_getallnotificationsbyslottype_fuzzer.cpp | 2 ++ .../service_getbundleimportance_fuzzer.cpp | 2 ++ .../service_getdeviceremindtype_fuzzer.cpp | 2 ++ .../service_getdonotdisturbprofile_fuzzer.cpp | 2 ++ .../service_getenabledforbundleslot_fuzzer.cpp | 2 ++ .../service_getenabledforbundleslotself_fuzzer.cpp | 2 ++ .../service_getnotificationrequestbyhashcode_fuzzer.cpp | 2 ++ .../service_getshowbadgeenabledforbundle_fuzzer.cpp | 2 ++ .../service_getslotbybundle_fuzzer.cpp | 2 ++ .../service_getspecialactivenotifications_fuzzer.cpp | 2 ++ .../service_getsyncnotificationenabledwithoutapp_fuzzer.cpp | 2 ++ .../service_isdistributedenablebybundle_fuzzer.cpp | 2 ++ .../service_isdistributedenabledbybundle_fuzzer.cpp | 2 ++ .../service_isneedsilentindonotdisturbmode_fuzzer.cpp | 2 ++ .../service_issmartreminderenabled_fuzzer.cpp | 2 ++ .../service_issupporttemplate_fuzzer.cpp | 2 ++ .../servicepublish_fuzzer/service_publish_fuzzer.cpp | 2 ++ .../service_publishasbundle_fuzzer.cpp | 2 ++ .../service_publishasbundlewithmaxcapacity_fuzzer.cpp | 2 ++ .../service_registerpushcallback_fuzzer.cpp | 2 ++ .../service_removeallnotifications_fuzzer.cpp | 2 ++ .../service_removedonotdisturbprofiles_fuzzer.cpp | 2 ++ .../service_removegroupbybundle_fuzzer.cpp | 2 ++ .../service_removenotification_fuzzer.cpp | 2 ++ .../service_removenotifications_fuzzer.cpp | 2 ++ .../service_replydistributeoperation_fuzzer.cpp | 2 ++ .../service_setbadgenumber_fuzzer.cpp | 2 ++ .../service_setbadgenumberfordhbybundle_fuzzer.cpp | 2 ++ .../service_setdistributedenabledbybundle_fuzzer.cpp | 2 ++ .../service_setdistributedenabledbyslot_fuzzer.cpp | 2 ++ .../service_setenabledforbundleslot_fuzzer.cpp | 2 ++ .../service_sethashcoderule_fuzzer.cpp | 2 ++ .../service_setnotificationsenabledbyuser_fuzzer.cpp | 2 ++ .../service_setnotificationsenabledforallbundles_fuzzer.cpp | 2 ++ .../service_setnotificationsenabledforspecialbundle_fuzzer.cpp | 2 ++ .../service_setshowbadgeenabledforbundle_fuzzer.cpp | 2 ++ .../service_setslotflagsasbundle_fuzzer.cpp | 2 ++ .../service_setsmartreminderenabled_fuzzer.cpp | 2 ++ .../service_setsyncnotificationenabledwithoutapp_fuzzer.cpp | 2 ++ .../service_settargetdevicestatus_fuzzer.cpp | 2 ++ .../serviceshelldump_fuzzer/service_shelldump_fuzzer.cpp | 2 ++ .../servicesubscribe_fuzzer/service_subscribe_fuzzer.cpp | 2 ++ .../service_subscribelocalliveview_fuzzer.cpp | 2 ++ .../serviceunsubscribe_fuzzer/service_unsubscribe_fuzzer.cpp | 2 ++ .../serviceupdateslots_fuzzer/service_updateslots_fuzzer.cpp | 2 ++ 61 files changed, 122 insertions(+) diff --git a/test/fuzztest/advancednotificationservice/serviceadddonotdisturbprofiles_fuzzer/service_adddonotdisturbprofiles_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceadddonotdisturbprofiles_fuzzer/service_adddonotdisturbprofiles_fuzzer.cpp index 95b3088b0..dd9efceb5 100644 --- a/test/fuzztest/advancednotificationservice/serviceadddonotdisturbprofiles_fuzzer/service_adddonotdisturbprofiles_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceadddonotdisturbprofiles_fuzzer/service_adddonotdisturbprofiles_fuzzer.cpp @@ -54,5 +54,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicecancel_fuzzer/service_cancel_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecancel_fuzzer/service_cancel_fuzzer.cpp index 41ce3f2db..566423fa5 100644 --- a/test/fuzztest/advancednotificationservice/servicecancel_fuzzer/service_cancel_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecancel_fuzzer/service_cancel_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicecancelall_fuzzer/service_cancelall_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecancelall_fuzzer/service_cancelall_fuzzer.cpp index 2c75c843b..5a987ca79 100644 --- a/test/fuzztest/advancednotificationservice/servicecancelall_fuzzer/service_cancelall_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecancelall_fuzzer/service_cancelall_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicecancelasbundlewithagent_fuzzer/service_cancelasbundlewithagent_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecancelasbundlewithagent_fuzzer/service_cancelasbundlewithagent_fuzzer.cpp index fb6911a84..7332ff4f8 100644 --- a/test/fuzztest/advancednotificationservice/servicecancelasbundlewithagent_fuzzer/service_cancelasbundlewithagent_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecancelasbundlewithagent_fuzzer/service_cancelasbundlewithagent_fuzzer.cpp @@ -47,5 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicecancelcontinuoustasknotification_fuzzer/service_cancelcontinuoustasknotification_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecancelcontinuoustasknotification_fuzzer/service_cancelcontinuoustasknotification_fuzzer.cpp index 1adb750ef..110384413 100644 --- a/test/fuzztest/advancednotificationservice/servicecancelcontinuoustasknotification_fuzzer/service_cancelcontinuoustasknotification_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecancelcontinuoustasknotification_fuzzer/service_cancelcontinuoustasknotification_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicecancelgroup_fuzzer/service_cancelgroup_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecancelgroup_fuzzer/service_cancelgroup_fuzzer.cpp index e8dadb50c..da4e60e25 100644 --- a/test/fuzztest/advancednotificationservice/servicecancelgroup_fuzzer/service_cancelgroup_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecancelgroup_fuzzer/service_cancelgroup_fuzzer.cpp @@ -38,5 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) /* Run your code on data */ FuzzedDataProvider fdp(data, size); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicecanpopenablenotificationdialog_fuzzer/service_canpopenablenotificationdialog_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecanpopenablenotificationdialog_fuzzer/service_canpopenablenotificationdialog_fuzzer.cpp index e15cb2dfe..9e9aee8c0 100644 --- a/test/fuzztest/advancednotificationservice/servicecanpopenablenotificationdialog_fuzzer/service_canpopenablenotificationdialog_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecanpopenablenotificationdialog_fuzzer/service_canpopenablenotificationdialog_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicecanpublishasbundle_fuzzer/service_canpublishasbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicecanpublishasbundle_fuzzer/service_canpublishasbundle_fuzzer.cpp index 32c258d9e..47d5fd7a5 100644 --- a/test/fuzztest/advancednotificationservice/servicecanpublishasbundle_fuzzer/service_canpublishasbundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicecanpublishasbundle_fuzzer/service_canpublishasbundle_fuzzer.cpp @@ -38,5 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) /* Run your code on data */ FuzzedDataProvider fdp(data, size); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicedelete_fuzzer/service_delete_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicedelete_fuzzer/service_delete_fuzzer.cpp index 6870c3504..00ce0088b 100644 --- a/test/fuzztest/advancednotificationservice/servicedelete_fuzzer/service_delete_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicedelete_fuzzer/service_delete_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicedeleteallbyuser_fuzzer/service_deleteallbyuser_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicedeleteallbyuser_fuzzer/service_deleteallbyuser_fuzzer.cpp index 0c6085de0..9b95b8a46 100644 --- a/test/fuzztest/advancednotificationservice/servicedeleteallbyuser_fuzzer/service_deleteallbyuser_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicedeleteallbyuser_fuzzer/service_deleteallbyuser_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicedeletebybundle_fuzzer/service_deletebybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicedeletebybundle_fuzzer/service_deletebybundle_fuzzer.cpp index 1682b7da1..fa894a463 100644 --- a/test/fuzztest/advancednotificationservice/servicedeletebybundle_fuzzer/service_deletebybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicedeletebybundle_fuzzer/service_deletebybundle_fuzzer.cpp @@ -45,5 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicedisablenotificationfeature_fuzzer/service_disablenotificationfeature_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicedisablenotificationfeature_fuzzer/service_disablenotificationfeature_fuzzer.cpp index 37a8ee071..59ef8f5d6 100644 --- a/test/fuzztest/advancednotificationservice/servicedisablenotificationfeature_fuzzer/service_disablenotificationfeature_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicedisablenotificationfeature_fuzzer/service_disablenotificationfeature_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicedistributeoperation_fuzzer/service_distributeoperation_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicedistributeoperation_fuzzer/service_distributeoperation_fuzzer.cpp index c1bcc338b..6ca8c65a1 100644 --- a/test/fuzztest/advancednotificationservice/servicedistributeoperation_fuzzer/service_distributeoperation_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicedistributeoperation_fuzzer/service_distributeoperation_fuzzer.cpp @@ -41,5 +41,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) /* Run your code on data */ FuzzedDataProvider fdp(data, size); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceenabledistributedbybundle_fuzzer/service_enabledistributedbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceenabledistributedbybundle_fuzzer/service_enabledistributedbybundle_fuzzer.cpp index 3b49c92d7..797253399 100644 --- a/test/fuzztest/advancednotificationservice/serviceenabledistributedbybundle_fuzzer/service_enabledistributedbybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceenabledistributedbybundle_fuzzer/service_enabledistributedbybundle_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetactivenotifications_fuzzer/service_getactivenotifications_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetactivenotifications_fuzzer/service_getactivenotifications_fuzzer.cpp index a4847117b..bc98895d6 100644 --- a/test/fuzztest/advancednotificationservice/servicegetactivenotifications_fuzzer/service_getactivenotifications_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetactivenotifications_fuzzer/service_getactivenotifications_fuzzer.cpp @@ -47,5 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetalldistribuedenabledbundles_fuzzer/service_getalldistribuedenabledbundles_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetalldistribuedenabledbundles_fuzzer/service_getalldistribuedenabledbundles_fuzzer.cpp index ae2d3e67a..d99aa5360 100644 --- a/test/fuzztest/advancednotificationservice/servicegetalldistribuedenabledbundles_fuzzer/service_getalldistribuedenabledbundles_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetalldistribuedenabledbundles_fuzzer/service_getalldistribuedenabledbundles_fuzzer.cpp @@ -52,5 +52,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetallnotificationsbyslottype_fuzzer/service_getallnotificationsbyslottype_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetallnotificationsbyslottype_fuzzer/service_getallnotificationsbyslottype_fuzzer.cpp index f70179043..7365d9310 100644 --- a/test/fuzztest/advancednotificationservice/servicegetallnotificationsbyslottype_fuzzer/service_getallnotificationsbyslottype_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetallnotificationsbyslottype_fuzzer/service_getallnotificationsbyslottype_fuzzer.cpp @@ -47,5 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp index 686f8e5da..2f4bfb98b 100644 --- a/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetbundleimportance_fuzzer/service_getbundleimportance_fuzzer.cpp @@ -43,5 +43,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetdeviceremindtype_fuzzer/service_getdeviceremindtype_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetdeviceremindtype_fuzzer/service_getdeviceremindtype_fuzzer.cpp index b3650758c..4f17ad9ce 100644 --- a/test/fuzztest/advancednotificationservice/servicegetdeviceremindtype_fuzzer/service_getdeviceremindtype_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetdeviceremindtype_fuzzer/service_getdeviceremindtype_fuzzer.cpp @@ -45,5 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbprofile_fuzzer/service_getdonotdisturbprofile_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbprofile_fuzzer/service_getdonotdisturbprofile_fuzzer.cpp index dcdedbddc..0b43b4ca1 100644 --- a/test/fuzztest/advancednotificationservice/servicegetdonotdisturbprofile_fuzzer/service_getdonotdisturbprofile_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetdonotdisturbprofile_fuzzer/service_getdonotdisturbprofile_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslot_fuzzer/service_getenabledforbundleslot_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslot_fuzzer/service_getenabledforbundleslot_fuzzer.cpp index 1223ab936..a981da7b3 100644 --- a/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslot_fuzzer/service_getenabledforbundleslot_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslot_fuzzer/service_getenabledforbundleslot_fuzzer.cpp @@ -45,5 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslotself_fuzzer/service_getenabledforbundleslotself_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslotself_fuzzer/service_getenabledforbundleslotself_fuzzer.cpp index dc3d88777..d40c9b3b4 100644 --- a/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslotself_fuzzer/service_getenabledforbundleslotself_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetenabledforbundleslotself_fuzzer/service_getenabledforbundleslotself_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetnotificationrequestbyhashcode_fuzzer/service_getnotificationrequestbyhashcode_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetnotificationrequestbyhashcode_fuzzer/service_getnotificationrequestbyhashcode_fuzzer.cpp index 592cd5086..8bf4cd160 100644 --- a/test/fuzztest/advancednotificationservice/servicegetnotificationrequestbyhashcode_fuzzer/service_getnotificationrequestbyhashcode_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetnotificationrequestbyhashcode_fuzzer/service_getnotificationrequestbyhashcode_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetshowbadgeenabledforbundle_fuzzer/service_getshowbadgeenabledforbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetshowbadgeenabledforbundle_fuzzer/service_getshowbadgeenabledforbundle_fuzzer.cpp index 7ee43f90b..2d2e52ca7 100644 --- a/test/fuzztest/advancednotificationservice/servicegetshowbadgeenabledforbundle_fuzzer/service_getshowbadgeenabledforbundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetshowbadgeenabledforbundle_fuzzer/service_getshowbadgeenabledforbundle_fuzzer.cpp @@ -49,5 +49,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetslotbybundle_fuzzer/service_getslotbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetslotbybundle_fuzzer/service_getslotbybundle_fuzzer.cpp index cf381c8dc..bf58feb64 100644 --- a/test/fuzztest/advancednotificationservice/servicegetslotbybundle_fuzzer/service_getslotbybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetslotbybundle_fuzzer/service_getslotbybundle_fuzzer.cpp @@ -48,6 +48,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetspecialactivenotifications_fuzzer/service_getspecialactivenotifications_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetspecialactivenotifications_fuzzer/service_getspecialactivenotifications_fuzzer.cpp index 2f46a5c61..1b366dd18 100644 --- a/test/fuzztest/advancednotificationservice/servicegetspecialactivenotifications_fuzzer/service_getspecialactivenotifications_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetspecialactivenotifications_fuzzer/service_getspecialactivenotifications_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicegetsyncnotificationenabledwithoutapp_fuzzer/service_getsyncnotificationenabledwithoutapp_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicegetsyncnotificationenabledwithoutapp_fuzzer/service_getsyncnotificationenabledwithoutapp_fuzzer.cpp index 02aeac804..9f9fafcbf 100644 --- a/test/fuzztest/advancednotificationservice/servicegetsyncnotificationenabledwithoutapp_fuzzer/service_getsyncnotificationenabledwithoutapp_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicegetsyncnotificationenabledwithoutapp_fuzzer/service_getsyncnotificationenabledwithoutapp_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenablebybundle_fuzzer/service_isdistributedenablebybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceisdistributedenablebybundle_fuzzer/service_isdistributedenablebybundle_fuzzer.cpp index f92ee9d14..2eb39a9c7 100644 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenablebybundle_fuzzer/service_isdistributedenablebybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceisdistributedenablebybundle_fuzzer/service_isdistributedenablebybundle_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbybundle_fuzzer/service_isdistributedenabledbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbybundle_fuzzer/service_isdistributedenabledbybundle_fuzzer.cpp index 17940436d..ba49adc04 100644 --- a/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbybundle_fuzzer/service_isdistributedenabledbybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceisdistributedenabledbybundle_fuzzer/service_isdistributedenabledbybundle_fuzzer.cpp @@ -50,5 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceisneedsilentindonotdisturbmode_fuzzer/service_isneedsilentindonotdisturbmode_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceisneedsilentindonotdisturbmode_fuzzer/service_isneedsilentindonotdisturbmode_fuzzer.cpp index 919803bb2..c24b1d05c 100644 --- a/test/fuzztest/advancednotificationservice/serviceisneedsilentindonotdisturbmode_fuzzer/service_isneedsilentindonotdisturbmode_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceisneedsilentindonotdisturbmode_fuzzer/service_isneedsilentindonotdisturbmode_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/serviceissmartreminderenabled_fuzzer/service_issmartreminderenabled_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceissmartreminderenabled_fuzzer/service_issmartreminderenabled_fuzzer.cpp index 0d9f9c9d3..f39bf6286 100644 --- a/test/fuzztest/advancednotificationservice/serviceissmartreminderenabled_fuzzer/service_issmartreminderenabled_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceissmartreminderenabled_fuzzer/service_issmartreminderenabled_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceissupporttemplate_fuzzer/service_issupporttemplate_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceissupporttemplate_fuzzer/service_issupporttemplate_fuzzer.cpp index 4c9b98fe0..451bf4f18 100644 --- a/test/fuzztest/advancednotificationservice/serviceissupporttemplate_fuzzer/service_issupporttemplate_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceissupporttemplate_fuzzer/service_issupporttemplate_fuzzer.cpp @@ -38,5 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) /* Run your code on data */ FuzzedDataProvider fdp(data, size); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicepublish_fuzzer/service_publish_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicepublish_fuzzer/service_publish_fuzzer.cpp index 8354836b8..5edc03f52 100644 --- a/test/fuzztest/advancednotificationservice/servicepublish_fuzzer/service_publish_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicepublish_fuzzer/service_publish_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicepublishasbundle_fuzzer/service_publishasbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicepublishasbundle_fuzzer/service_publishasbundle_fuzzer.cpp index 80b24d4e3..d49a76c2f 100644 --- a/test/fuzztest/advancednotificationservice/servicepublishasbundle_fuzzer/service_publishasbundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicepublishasbundle_fuzzer/service_publishasbundle_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicepublishasbundlewithmaxcapacity_fuzzer/service_publishasbundlewithmaxcapacity_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicepublishasbundlewithmaxcapacity_fuzzer/service_publishasbundlewithmaxcapacity_fuzzer.cpp index 56fe26b2d..01bba5f95 100644 --- a/test/fuzztest/advancednotificationservice/servicepublishasbundlewithmaxcapacity_fuzzer/service_publishasbundlewithmaxcapacity_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicepublishasbundlewithmaxcapacity_fuzzer/service_publishasbundlewithmaxcapacity_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceregisterpushcallback_fuzzer/service_registerpushcallback_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceregisterpushcallback_fuzzer/service_registerpushcallback_fuzzer.cpp index c9776ac46..278123feb 100644 --- a/test/fuzztest/advancednotificationservice/serviceregisterpushcallback_fuzzer/service_registerpushcallback_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceregisterpushcallback_fuzzer/service_registerpushcallback_fuzzer.cpp @@ -57,5 +57,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceremoveallnotifications_fuzzer/service_removeallnotifications_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremoveallnotifications_fuzzer/service_removeallnotifications_fuzzer.cpp index 91c833824..efc57763e 100644 --- a/test/fuzztest/advancednotificationservice/serviceremoveallnotifications_fuzzer/service_removeallnotifications_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceremoveallnotifications_fuzzer/service_removeallnotifications_fuzzer.cpp @@ -43,5 +43,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceremovedonotdisturbprofiles_fuzzer/service_removedonotdisturbprofiles_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremovedonotdisturbprofiles_fuzzer/service_removedonotdisturbprofiles_fuzzer.cpp index a42ca49a4..f03042440 100644 --- a/test/fuzztest/advancednotificationservice/serviceremovedonotdisturbprofiles_fuzzer/service_removedonotdisturbprofiles_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceremovedonotdisturbprofiles_fuzzer/service_removedonotdisturbprofiles_fuzzer.cpp @@ -50,5 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceremovegroupbybundle_fuzzer/service_removegroupbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremovegroupbybundle_fuzzer/service_removegroupbybundle_fuzzer.cpp index f2fc66184..d23f7ca9f 100644 --- a/test/fuzztest/advancednotificationservice/serviceremovegroupbybundle_fuzzer/service_removegroupbybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceremovegroupbybundle_fuzzer/service_removegroupbybundle_fuzzer.cpp @@ -49,5 +49,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceremovenotification_fuzzer/service_removenotification_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremovenotification_fuzzer/service_removenotification_fuzzer.cpp index fb3e6c2da..3f715c759 100644 --- a/test/fuzztest/advancednotificationservice/serviceremovenotification_fuzzer/service_removenotification_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceremovenotification_fuzzer/service_removenotification_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceremovenotifications_fuzzer/service_removenotifications_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceremovenotifications_fuzzer/service_removenotifications_fuzzer.cpp index 8ae2926aa..4b0ae3c2b 100644 --- a/test/fuzztest/advancednotificationservice/serviceremovenotifications_fuzzer/service_removenotifications_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceremovenotifications_fuzzer/service_removenotifications_fuzzer.cpp @@ -51,5 +51,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicereplydistributeoperation_fuzzer/service_replydistributeoperation_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicereplydistributeoperation_fuzzer/service_replydistributeoperation_fuzzer.cpp index 103a24590..9a69da76d 100644 --- a/test/fuzztest/advancednotificationservice/servicereplydistributeoperation_fuzzer/service_replydistributeoperation_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicereplydistributeoperation_fuzzer/service_replydistributeoperation_fuzzer.cpp @@ -45,5 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumber_fuzzer/service_setbadgenumber_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetbadgenumber_fuzzer/service_setbadgenumber_fuzzer.cpp index c91dcd072..b2a6905c3 100644 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumber_fuzzer/service_setbadgenumber_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetbadgenumber_fuzzer/service_setbadgenumber_fuzzer.cpp @@ -43,5 +43,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) OHOS::Notification::OHOS_PERMISSION_SET_UNREMOVABLE_NOTIFICATION }; OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetbadgenumberfordhbybundle_fuzzer/service_setbadgenumberfordhbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetbadgenumberfordhbybundle_fuzzer/service_setbadgenumberfordhbybundle_fuzzer.cpp index c353508f7..a9ad1dc73 100644 --- a/test/fuzztest/advancednotificationservice/servicesetbadgenumberfordhbybundle_fuzzer/service_setbadgenumberfordhbybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetbadgenumberfordhbybundle_fuzzer/service_setbadgenumberfordhbybundle_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbybundle_fuzzer/service_setdistributedenabledbybundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbybundle_fuzzer/service_setdistributedenabledbybundle_fuzzer.cpp index 3b268dc2d..a2a429523 100644 --- a/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbybundle_fuzzer/service_setdistributedenabledbybundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbybundle_fuzzer/service_setdistributedenabledbybundle_fuzzer.cpp @@ -45,5 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbyslot_fuzzer/service_setdistributedenabledbyslot_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbyslot_fuzzer/service_setdistributedenabledbyslot_fuzzer.cpp index a97501400..1ccc6d06e 100644 --- a/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbyslot_fuzzer/service_setdistributedenabledbyslot_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetdistributedenabledbyslot_fuzzer/service_setdistributedenabledbyslot_fuzzer.cpp @@ -47,5 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetenabledforbundleslot_fuzzer/service_setenabledforbundleslot_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetenabledforbundleslot_fuzzer/service_setenabledforbundleslot_fuzzer.cpp index f51efc5d9..2264bee6f 100644 --- a/test/fuzztest/advancednotificationservice/servicesetenabledforbundleslot_fuzzer/service_setenabledforbundleslot_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetenabledforbundleslot_fuzzer/service_setenabledforbundleslot_fuzzer.cpp @@ -47,5 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesethashcoderule_fuzzer/service_sethashcoderule_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesethashcoderule_fuzzer/service_sethashcoderule_fuzzer.cpp index 013f10a0f..07319667e 100644 --- a/test/fuzztest/advancednotificationservice/servicesethashcoderule_fuzzer/service_sethashcoderule_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesethashcoderule_fuzzer/service_sethashcoderule_fuzzer.cpp @@ -42,5 +42,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) OHOS::Notification::OHOS_PERMISSION_SET_UNREMOVABLE_NOTIFICATION }; OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledbyuser_fuzzer/service_setnotificationsenabledbyuser_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledbyuser_fuzzer/service_setnotificationsenabledbyuser_fuzzer.cpp index 89b09e8a7..4426b125d 100644 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledbyuser_fuzzer/service_setnotificationsenabledbyuser_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledbyuser_fuzzer/service_setnotificationsenabledbyuser_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforallbundles_fuzzer/service_setnotificationsenabledforallbundles_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforallbundles_fuzzer/service_setnotificationsenabledforallbundles_fuzzer.cpp index 7a2d77f04..cc741cf74 100644 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforallbundles_fuzzer/service_setnotificationsenabledforallbundles_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforallbundles_fuzzer/service_setnotificationsenabledforallbundles_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforspecialbundle_fuzzer/service_setnotificationsenabledforspecialbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforspecialbundle_fuzzer/service_setnotificationsenabledforspecialbundle_fuzzer.cpp index 6a1597a2e..78c990eb9 100644 --- a/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforspecialbundle_fuzzer/service_setnotificationsenabledforspecialbundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetnotificationsenabledforspecialbundle_fuzzer/service_setnotificationsenabledforspecialbundle_fuzzer.cpp @@ -49,5 +49,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetshowbadgeenabledforbundle_fuzzer/service_setshowbadgeenabledforbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetshowbadgeenabledforbundle_fuzzer/service_setshowbadgeenabledforbundle_fuzzer.cpp index 74a547c07..294318f68 100644 --- a/test/fuzztest/advancednotificationservice/servicesetshowbadgeenabledforbundle_fuzzer/service_setshowbadgeenabledforbundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetshowbadgeenabledforbundle_fuzzer/service_setshowbadgeenabledforbundle_fuzzer.cpp @@ -45,5 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetslotflagsasbundle_fuzzer/service_setslotflagsasbundle_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetslotflagsasbundle_fuzzer/service_setslotflagsasbundle_fuzzer.cpp index cb84b9cc5..8a3987ee5 100644 --- a/test/fuzztest/advancednotificationservice/servicesetslotflagsasbundle_fuzzer/service_setslotflagsasbundle_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetslotflagsasbundle_fuzzer/service_setslotflagsasbundle_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesetsmartreminderenabled_fuzzer/service_setsmartreminderenabled_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetsmartreminderenabled_fuzzer/service_setsmartreminderenabled_fuzzer.cpp index a2c718f49..19f6ab2e1 100644 --- a/test/fuzztest/advancednotificationservice/servicesetsmartreminderenabled_fuzzer/service_setsmartreminderenabled_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetsmartreminderenabled_fuzzer/service_setsmartreminderenabled_fuzzer.cpp @@ -46,5 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } \ No newline at end of file diff --git a/test/fuzztest/advancednotificationservice/servicesetsyncnotificationenabledwithoutapp_fuzzer/service_setsyncnotificationenabledwithoutapp_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesetsyncnotificationenabledwithoutapp_fuzzer/service_setsyncnotificationenabledwithoutapp_fuzzer.cpp index 476e7e0e1..b7a8312e1 100644 --- a/test/fuzztest/advancednotificationservice/servicesetsyncnotificationenabledwithoutapp_fuzzer/service_setsyncnotificationenabledwithoutapp_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesetsyncnotificationenabledwithoutapp_fuzzer/service_setsyncnotificationenabledwithoutapp_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesettargetdevicestatus_fuzzer/service_settargetdevicestatus_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesettargetdevicestatus_fuzzer/service_settargetdevicestatus_fuzzer.cpp index 8ac418b9e..851c96691 100644 --- a/test/fuzztest/advancednotificationservice/servicesettargetdevicestatus_fuzzer/service_settargetdevicestatus_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesettargetdevicestatus_fuzzer/service_settargetdevicestatus_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceshelldump_fuzzer/service_shelldump_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceshelldump_fuzzer/service_shelldump_fuzzer.cpp index 39f49e9fe..302556e5c 100644 --- a/test/fuzztest/advancednotificationservice/serviceshelldump_fuzzer/service_shelldump_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceshelldump_fuzzer/service_shelldump_fuzzer.cpp @@ -49,5 +49,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesubscribe_fuzzer/service_subscribe_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesubscribe_fuzzer/service_subscribe_fuzzer.cpp index 846207df8..f79340807 100644 --- a/test/fuzztest/advancednotificationservice/servicesubscribe_fuzzer/service_subscribe_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesubscribe_fuzzer/service_subscribe_fuzzer.cpp @@ -78,5 +78,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/servicesubscribelocalliveview_fuzzer/service_subscribelocalliveview_fuzzer.cpp b/test/fuzztest/advancednotificationservice/servicesubscribelocalliveview_fuzzer/service_subscribelocalliveview_fuzzer.cpp index cefad9391..d4124891c 100644 --- a/test/fuzztest/advancednotificationservice/servicesubscribelocalliveview_fuzzer/service_subscribelocalliveview_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/servicesubscribelocalliveview_fuzzer/service_subscribelocalliveview_fuzzer.cpp @@ -44,5 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) /* Run your code on data */ FuzzedDataProvider fdp(data, size); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceunsubscribe_fuzzer/service_unsubscribe_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceunsubscribe_fuzzer/service_unsubscribe_fuzzer.cpp index 56eed56a6..60397a1ed 100644 --- a/test/fuzztest/advancednotificationservice/serviceunsubscribe_fuzzer/service_unsubscribe_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceunsubscribe_fuzzer/service_unsubscribe_fuzzer.cpp @@ -85,5 +85,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } diff --git a/test/fuzztest/advancednotificationservice/serviceupdateslots_fuzzer/service_updateslots_fuzzer.cpp b/test/fuzztest/advancednotificationservice/serviceupdateslots_fuzzer/service_updateslots_fuzzer.cpp index 7b543e9b3..a7c0ffb9f 100644 --- a/test/fuzztest/advancednotificationservice/serviceupdateslots_fuzzer/service_updateslots_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice/serviceupdateslots_fuzzer/service_updateslots_fuzzer.cpp @@ -48,5 +48,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) }; MockRandomToken(&fdp, requestPermission); OHOS::Notification::DoSomethingInterestingWithMyAPI(&fdp); + constexpr int sleepMs = 1000; + std::this_thread::sleep_for(std::chrono::milliseconds(sleepMs)); return 0; } -- Gitee