mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-27 02:00:45 +00:00
commit
830a45c267
@ -33,18 +33,12 @@ static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t SIM_TYPE_NUM = 2;
|
||||
constexpr int32_t SIZE_LIMIT = 4;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
constexpr uint32_t FUCTION_SIZE = 100;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "addiccdiallingnumbers_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -246,5 +240,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,17 +33,11 @@ namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t CHOICE_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "getsimeons_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -189,5 +183,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -32,17 +32,12 @@ using namespace OHOS::Telephony;
|
||||
namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 3;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "sendenvelopecmd_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -234,5 +229,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -31,17 +31,11 @@ using namespace OHOS::Telephony;
|
||||
namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "sendterminalresponsecmd_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -168,5 +162,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -38,17 +38,11 @@ constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t IMS_TYPE = 3;
|
||||
constexpr int32_t NR_MODE = 4;
|
||||
constexpr int32_t NETWORK_MODE = 7;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "setradiostate_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -331,5 +325,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,17 +33,11 @@ using namespace OHOS::Telephony;
|
||||
namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "setshowname_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -169,5 +163,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -32,17 +32,11 @@ using namespace OHOS::Telephony;
|
||||
namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "setshownumber_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -152,5 +146,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,17 +33,11 @@ namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t LOCK_TYPE = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "setvoicemailinfo_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -155,5 +149,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t TYPE_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
constexpr int32_t SIM_AUTH_EAP_SIM_TYPE = 128;
|
||||
constexpr int32_t SIM_AUTH_EAP_AKA_TYPE = 129;
|
||||
bool g_flag = false;
|
||||
@ -41,12 +40,7 @@ bool g_flag = false;
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "simauthentication_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -185,5 +179,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -32,17 +32,12 @@ using namespace OHOS::Telephony;
|
||||
namespace OHOS {
|
||||
static bool g_isInited = false;
|
||||
constexpr int32_t SLOT_NUM = 2;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 10;
|
||||
constexpr int32_t SLEEP_TIME_SECONDS = 3;
|
||||
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "unlockpin_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -280,5 +275,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
@ -38,12 +38,7 @@ constexpr int32_t SLEEP_TIME_SECONDS = 2;
|
||||
bool IsServiceInited()
|
||||
{
|
||||
if (!g_isInited) {
|
||||
auto onStart = [] { DelayedSingleton<CoreService>::GetInstance()->OnStart(); };
|
||||
std::thread startThread(onStart);
|
||||
pthread_setname_np(startThread.native_handle(), "updateiccdiallingnumbers_fuzzer");
|
||||
startThread.join();
|
||||
|
||||
sleep(SLEEP_TIME_SECONDS);
|
||||
DelayedSingleton<CoreService>::GetInstance()->OnStart();
|
||||
if (DelayedSingleton<CoreService>::GetInstance()->GetServiceRunningState() ==
|
||||
static_cast<int32_t>(ServiceRunningState::STATE_RUNNING)) {
|
||||
g_isInited = true;
|
||||
@ -217,5 +212,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
OHOS::AddCoreServiceTokenFuzzer token;
|
||||
/* Run your code on data */
|
||||
OHOS::DoSomethingInterestingWithMyAPI(data, size);
|
||||
OHOS::DelayedSingleton<CoreService>::DestroyInstance();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user