From 155fd381a757dcbf900e71b8fe44c46292479c12 Mon Sep 17 00:00:00 2001 From: wuyunxun Date: Mon, 1 Sep 2025 19:12:42 +0800 Subject: [PATCH] =?UTF-8?q?ipc=5Fprocess=5Fskeleton=E8=A1=A5=E5=85=85fuzz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuyunxun Change-Id: I7f7556343ed23dc518c5f328f3a61a728ddaebe7 --- test/fuzztest/BUILD.gn | 1 + .../src/mock/ipcprocessskeletonmock/BUILD.gn | 23 ++ .../include/ipcprocessskeletonmock_fuzzer.h | 35 +++ .../ipcprocessskeletonmock001_fuzzer/BUILD.gn | 44 ++++ .../corpus/init | 16 ++ .../ipcprocessskeletonmock001_fuzzer.cpp | 218 ++++++++++++++++++ .../project.xml | 25 ++ .../ipcprocessskeletonmock002_fuzzer/BUILD.gn | 44 ++++ .../corpus/init | 16 ++ .../ipcprocessskeletonmock002_fuzzer.cpp | 147 ++++++++++++ .../project.xml | 25 ++ .../ipcprocessskeletonmock003_fuzzer/BUILD.gn | 44 ++++ .../corpus/init | 16 ++ .../ipcprocessskeletonmock003_fuzzer.cpp | 137 +++++++++++ .../project.xml | 25 ++ .../ipcprocessskeletonmock004_fuzzer/BUILD.gn | 44 ++++ .../corpus/init | 16 ++ .../ipcprocessskeletonmock004_fuzzer.cpp | 115 +++++++++ .../project.xml | 25 ++ test/resource/ipc/ohos_test.xml | 24 ++ 20 files changed, 1040 insertions(+) create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/BUILD.gn create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/include/ipcprocessskeletonmock_fuzzer.h create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/BUILD.gn create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/corpus/init create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/ipcprocessskeletonmock001_fuzzer.cpp create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/project.xml create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/BUILD.gn create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/corpus/init create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/ipcprocessskeletonmock002_fuzzer.cpp create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/project.xml create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/BUILD.gn create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/corpus/init create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/ipcprocessskeletonmock003_fuzzer.cpp create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/project.xml create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/BUILD.gn create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/corpus/init create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/ipcprocessskeletonmock004_fuzzer.cpp create mode 100644 test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/project.xml diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index fd52f2bc..cb4a8069 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -69,6 +69,7 @@ group("fuzztest") { "ipc/native/src/mock/dbinderservicestubmock:DBinderServiceStubMockFuzzTest", "ipc/native/src/mock/dbinderremotelistenermock_fuzzer:DBinderRemoteListenerMockFuzzTest", "ipc/native/src/mock/dbinderservicemock:dbinderservicemockfuzz", + "ipc/native/src/mock/ipcprocessskeletonmock:ipcprocessskeletonmockfuzz", "ipc/native/src/mock/binderinvokermock:binderinvokermockfuzz", "ipc/native/src/mock/dbinderdatabusinvokermock:dbinderdatabusinvokermockfuzz", "ipc/native/src/mock/ipcobjectproxymock:ipcobjectproxymockfuzz", diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/BUILD.gn b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/BUILD.gn new file mode 100644 index 00000000..4faf9ea1 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/BUILD.gn @@ -0,0 +1,23 @@ +# 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. + +##############################fuzztest########################################## +group("ipcprocessskeletonmockfuzz") { + testonly = true + deps = [ + "ipcprocessskeletonmock001_fuzzer:IPCProcessSkeletonMock001FuzzTest", + "ipcprocessskeletonmock002_fuzzer:IPCProcessSkeletonMock002FuzzTest", + "ipcprocessskeletonmock003_fuzzer:IPCProcessSkeletonMock003FuzzTest", + "ipcprocessskeletonmock004_fuzzer:IPCProcessSkeletonMock004FuzzTest", + ] +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/include/ipcprocessskeletonmock_fuzzer.h b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/include/ipcprocessskeletonmock_fuzzer.h new file mode 100644 index 00000000..5ce449e1 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/include/ipcprocessskeletonmock_fuzzer.h @@ -0,0 +1,35 @@ +/* + * 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 IPCPROCESSSKELETON_MOCK_FUZZER_H +#define IPCPROCESSSKELETON_MOCK_FUZZER_H + +#include +#include +#include +#include + +#include "ipc_process_skeleton.h" +#include "ipc_thread_skeleton.h" +#include "process_skeleton.h" +#include "string_ex.h" + +namespace OHOS { +static constexpr size_t MAX_STR_LEN = 100; +static constexpr size_t TIMEOUT_SECOND = 1; +} + +#define FUZZ_PROJECT_NAME "ipcprocessskeletonmock_fuzzer" + +#endif \ No newline at end of file diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/BUILD.gn b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/BUILD.gn new file mode 100644 index 00000000..dcc3fdb0 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/BUILD.gn @@ -0,0 +1,44 @@ +# 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("//build/config/features.gni") +import("//build/test.gni") +import("../../../../../../../../config.gni") +##############################fuzztest########################################## +ohos_fuzztest("IPCProcessSkeletonMock001FuzzTest") { + module_out_path = "ipc/ipc" + fuzz_config_file = "../ipcprocessskeletonmock001_fuzzer" + defines = [ + "private = public", + "protected = public", + ] + include_dirs = [ + "../include", + "$IPC_ROOT_PATH/utils/include", + ] + sources = [ "ipcprocessskeletonmock001_fuzzer.cpp" ] + deps = [ + "$IPC_ROOT_PATH/interfaces/innerkits/ipc_single:ipc_single_test", + "$IPC_ROOT_PATH/ipc/native/src/core:ipc_common", + ] + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:libdbinder", + "ipc:ipc_core", + "googletest:gmock", + "googletest:gtest", + ] + resource_config_file = "$IPC_ROOT_PATH/test/resource/ipc/ohos_test.xml" +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/corpus/init b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/corpus/init new file mode 100644 index 00000000..7ade8a0f --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * 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. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/ipcprocessskeletonmock001_fuzzer.cpp b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/ipcprocessskeletonmock001_fuzzer.cpp new file mode 100644 index 00000000..34891818 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/ipcprocessskeletonmock001_fuzzer.cpp @@ -0,0 +1,218 @@ +/* + * 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 "ipcprocessskeletonmock_fuzzer.h" + +using namespace testing; +using namespace testing::ext; + +namespace OHOS { +class IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterface() {}; + virtual ~IPCProcessSkeletonInterface() {}; + + virtual ProcessSkeleton *GetInstance() = 0; + virtual sptr QueryObject(const std::u16string &descriptor, bool lockFlag) = 0; + virtual IRemoteInvoker *GetRemoteInvoker(int proto) = 0; + virtual bool PingService(int32_t handle) = 0; + virtual bool AttachObject(IRemoteObject *object, bool lockFlag) = 0; +}; + +class IPCProcessSkeletonInterfaceMock : public IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterfaceMock(); + ~IPCProcessSkeletonInterfaceMock() override; + + MOCK_METHOD(ProcessSkeleton *, GetInstance, (), (override)); + MOCK_METHOD(sptr, QueryObject, (const std::u16string &descriptor, bool lockFlag), (override)); + MOCK_METHOD(IRemoteInvoker *, GetRemoteInvoker, (int proto), (override)); + MOCK_METHOD(bool, PingService, (int32_t handle), (override)); + MOCK_METHOD(bool, AttachObject, (IRemoteObject * object, bool lockFlag), (override)); +}; + +static void *g_interface = nullptr; + +IPCProcessSkeletonInterfaceMock::IPCProcessSkeletonInterfaceMock() +{ + g_interface = reinterpret_cast(this); +} + +IPCProcessSkeletonInterfaceMock::~IPCProcessSkeletonInterfaceMock() +{ + g_interface = nullptr; +} + +static IPCProcessSkeletonInterface *GetIPCProcessSkeletonInterface() +{ + return reinterpret_cast(g_interface); +} + +extern "C" { +ProcessSkeleton *ProcessSkeleton::GetInstance() +{ + if (g_interface == nullptr) { + return nullptr; + } + return GetIPCProcessSkeletonInterface()->GetInstance(); +} + +sptr IPCProcessSkeleton::QueryObject(const std::u16string &descriptor, bool lockFlag) +{ + if (g_interface == nullptr) { + return nullptr; + } + return GetIPCProcessSkeletonInterface()->QueryObject(descriptor, lockFlag); +} + +IRemoteInvoker *IPCThreadSkeleton::GetRemoteInvoker(int proto) +{ + if (g_interface == nullptr) { + return nullptr; + } + return GetIPCProcessSkeletonInterface()->GetRemoteInvoker(proto); +} + +bool BinderInvoker::PingService(int32_t handle) +{ + if (g_interface == nullptr) { + return true; + } + return GetIPCProcessSkeletonInterface()->PingService(handle); +} + +bool IPCProcessSkeleton::AttachObject(IRemoteObject *object, bool lockFlag) +{ + if (g_interface == nullptr) { + return true; + } + return GetIPCProcessSkeletonInterface()->AttachObject(object, lockFlag); +} +} + +void FindOrNewObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + int handle = provider.ConsumeIntegral(); + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillOnce(Return(nullptr)); + current->FindOrNewObject(handle, nullptr); +} + +void GetProxyObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + int handle = provider.ConsumeIntegral(); + bool newFlag = provider.ConsumeBool(); + current->GetProxyObject(handle, newFlag); + + ProcessSkeleton *processSkeleton = new (std::nothrow) ProcessSkeleton(); + sptr object = new (std::nothrow) IPCObjectStub(); + if (processSkeleton == nullptr || object == nullptr) { + return; + } + processSkeleton->exitFlag_ = true; + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(processSkeleton)); + current->GetProxyObject(handle, newFlag); + + handle = REGISTRY_HANDLE; + processSkeleton->exitFlag_ = false; + EXPECT_CALL(mock, QueryObject(_, false)).WillRepeatedly(Return(nullptr)); + current->GetProxyObject(handle, newFlag); + + BinderInvoker *invoker = new (std::nothrow) BinderInvoker(); + if (invoker == nullptr) { + delete processSkeleton; + return; + } + EXPECT_CALL(mock, GetRemoteInvoker(IRemoteObject::IF_PROT_DEFAULT)).WillRepeatedly(Return(invoker)); + EXPECT_CALL(mock, PingService(_)).WillRepeatedly(Return(false)); + current->GetProxyObject(handle, newFlag); + + EXPECT_CALL(mock, PingService(_)).WillRepeatedly(Return(true)); + EXPECT_CALL(mock, AttachObject(_, false)).WillOnce(Return(false)); + current->GetProxyObject(handle, newFlag); + delete invoker; + delete processSkeleton; +} + +void SetRegistryObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + std::string descriptor = provider.ConsumeRandomLengthString(MAX_STR_LEN); + std::u16string descriptor16 = Str8ToStr16(descriptor); + sptr object = new (std::nothrow) IPCObjectStub(descriptor16); + if (current == nullptr || object == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(nullptr)); + current->SetRegistryObject(object); + + ProcessSkeleton *processSkeleton = new (std::nothrow) ProcessSkeleton(); + if (processSkeleton == nullptr) { + return; + } + processSkeleton->exitFlag_ = false; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(processSkeleton)); + EXPECT_CALL(mock, GetRemoteInvoker(_)).WillRepeatedly(Return(nullptr)); + current->SetRegistryObject(object); + delete processSkeleton; +} + +void SpawnThreadFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + int policy = provider.ConsumeIntegral(); + int proto = provider.ConsumeIntegral(); + current->threadPool_ = nullptr; + current->SpawnThread(policy, proto); +} + +void OnThreadTerminatedFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + std::string threadName = provider.ConsumeRandomLengthString(MAX_STR_LEN); + current->threadPool_ = nullptr; + current->OnThreadTerminated(threadName); +} + +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + FuzzedDataProvider provider(data, size); + OHOS::FindOrNewObjectFuzzTest(provider); + OHOS::GetProxyObjectFuzzTest(provider); + OHOS::SetRegistryObjectFuzzTest(provider); + OHOS::SpawnThreadFuzzTest(provider); + OHOS::OnThreadTerminatedFuzzTest(provider); + return 0; +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/project.xml b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/project.xml new file mode 100644 index 00000000..226522bd --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock001_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 10000 + + 300 + + 4096 + + diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/BUILD.gn b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/BUILD.gn new file mode 100644 index 00000000..44536da4 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/BUILD.gn @@ -0,0 +1,44 @@ +# 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("//build/config/features.gni") +import("//build/test.gni") +import("../../../../../../../../config.gni") +##############################fuzztest########################################## +ohos_fuzztest("IPCProcessSkeletonMock002FuzzTest") { + module_out_path = "ipc/ipc" + fuzz_config_file = "../ipcprocessskeletonmock002_fuzzer" + defines = [ + "private = public", + "protected = public", + ] + include_dirs = [ + "../include", + "$IPC_ROOT_PATH/utils/include", + ] + sources = [ "ipcprocessskeletonmock002_fuzzer.cpp" ] + deps = [ + "$IPC_ROOT_PATH/interfaces/innerkits/ipc_single:ipc_single_test", + "$IPC_ROOT_PATH/ipc/native/src/core:ipc_common", + ] + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:libdbinder", + "ipc:ipc_core", + "googletest:gmock", + "googletest:gtest", + ] + resource_config_file = "$IPC_ROOT_PATH/test/resource/ipc/ohos_test.xml" +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/corpus/init b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/corpus/init new file mode 100644 index 00000000..7ade8a0f --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * 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. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/ipcprocessskeletonmock002_fuzzer.cpp b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/ipcprocessskeletonmock002_fuzzer.cpp new file mode 100644 index 00000000..b9f96b60 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/ipcprocessskeletonmock002_fuzzer.cpp @@ -0,0 +1,147 @@ +/* + * 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 "ipcprocessskeletonmock_fuzzer.h" + +using namespace testing; +using namespace testing::ext; + +namespace OHOS { +class IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterface() {}; + virtual ~IPCProcessSkeletonInterface() {}; + + virtual ProcessSkeleton *GetInstance() = 0; +}; + +class IPCProcessSkeletonInterfaceMock : public IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterfaceMock(); + ~IPCProcessSkeletonInterfaceMock() override; + + MOCK_METHOD(ProcessSkeleton *, GetInstance, (), (override)); +}; + +static void *g_interface = nullptr; + +IPCProcessSkeletonInterfaceMock::IPCProcessSkeletonInterfaceMock() +{ + g_interface = reinterpret_cast(this); +} + +IPCProcessSkeletonInterfaceMock::~IPCProcessSkeletonInterfaceMock() +{ + g_interface = nullptr; +} + +static IPCProcessSkeletonInterface *GetIPCProcessSkeletonInterface() +{ + return reinterpret_cast(g_interface); +} + +extern "C" { +ProcessSkeleton *ProcessSkeleton::GetInstance() +{ + if (g_interface == nullptr) { + return nullptr; + } + return GetIPCProcessSkeletonInterface()->GetInstance(); +} +} + +void IsContainsObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + std::string descriptor = provider.ConsumeRandomLengthString(MAX_STR_LEN); + std::u16string descriptor16 = Str8ToStr16(descriptor); + sptr object = new (std::nothrow) IPCObjectStub(descriptor16); + if (current == nullptr || object == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(nullptr)); + current->IsContainsObject(object.GetRefPtr()); +} + +void DetachObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + std::string descriptor = provider.ConsumeRandomLengthString(MAX_STR_LEN); + std::u16string descriptor16 = Str8ToStr16(descriptor); + sptr object = new (std::nothrow) IPCObjectStub(descriptor16); + if (current == nullptr || object == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(nullptr)); + current->DetachObject(object.GetRefPtr()); +} + +void AttachObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + std::string descriptor = provider.ConsumeRandomLengthString(MAX_STR_LEN); + std::u16string descriptor16 = Str8ToStr16(descriptor); + sptr object = new (std::nothrow) IPCObjectStub(descriptor16); + if (current == nullptr || object == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(nullptr)); + bool lockFlag = provider.ConsumeBool(); + current->AttachObject(object.GetRefPtr(), lockFlag); +} + +void QueryObjectFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(nullptr)); + std::string descriptor = provider.ConsumeRandomLengthString(MAX_STR_LEN); + std::u16string descriptor16 = Str8ToStr16(descriptor); + bool lockFlag = provider.ConsumeBool(); + current->QueryObject(descriptor16, lockFlag); +} + +void SetIPCProxyLimitFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, GetInstance()).WillRepeatedly(Return(nullptr)); + uint64_t num = provider.ConsumeIntegral(); + current->SetIPCProxyLimit(num, nullptr); +} + +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + FuzzedDataProvider provider(data, size); + OHOS::IsContainsObjectFuzzTest(provider); + OHOS::DetachObjectFuzzTest(provider); + OHOS::AttachObjectFuzzTest(provider); + OHOS::QueryObjectFuzzTest(provider); + OHOS::SetIPCProxyLimitFuzzTest(provider); + return 0; +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/project.xml b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/project.xml new file mode 100644 index 00000000..226522bd --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock002_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 10000 + + 300 + + 4096 + + diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/BUILD.gn b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/BUILD.gn new file mode 100644 index 00000000..e50eefa3 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/BUILD.gn @@ -0,0 +1,44 @@ +# 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("//build/config/features.gni") +import("//build/test.gni") +import("../../../../../../../../config.gni") +##############################fuzztest########################################## +ohos_fuzztest("IPCProcessSkeletonMock003FuzzTest") { + module_out_path = "ipc/ipc" + fuzz_config_file = "../ipcprocessskeletonmock003_fuzzer" + defines = [ + "private = public", + "protected = public", + ] + include_dirs = [ + "../include", + "$IPC_ROOT_PATH/utils/include", + ] + sources = [ "ipcprocessskeletonmock003_fuzzer.cpp" ] + deps = [ + "$IPC_ROOT_PATH/interfaces/innerkits/ipc_single:ipc_single_test", + "$IPC_ROOT_PATH/ipc/native/src/core:ipc_common", + ] + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:libdbinder", + "ipc:ipc_core", + "googletest:gmock", + "googletest:gtest", + ] + resource_config_file = "$IPC_ROOT_PATH/test/resource/ipc/ohos_test.xml" +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/corpus/init b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/corpus/init new file mode 100644 index 00000000..7ade8a0f --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * 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. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/ipcprocessskeletonmock003_fuzzer.cpp b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/ipcprocessskeletonmock003_fuzzer.cpp new file mode 100644 index 00000000..207af5e9 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/ipcprocessskeletonmock003_fuzzer.cpp @@ -0,0 +1,137 @@ +/* + * 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 "ipcprocessskeletonmock_fuzzer.h" + +using namespace testing; +using namespace testing::ext; + +namespace OHOS { +class IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterface() {}; + virtual ~IPCProcessSkeletonInterface() {}; + + virtual bool IsSameRemoteObject(IRemoteObject *stub, int pid, int uid, uint32_t tokenId, + const std::string &deviceId, const std::shared_ptr &auth) = 0; +}; + +class IPCProcessSkeletonInterfaceMock : public IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterfaceMock(); + ~IPCProcessSkeletonInterfaceMock() override; + + MOCK_METHOD(bool, IsSameRemoteObject, (IRemoteObject * stub, int pid, int uid, uint32_t tokenId, + const std::string &deviceId, const std::shared_ptr &auth), (override)); +}; + +static void *g_interface = nullptr; + +IPCProcessSkeletonInterfaceMock::IPCProcessSkeletonInterfaceMock() +{ + g_interface = reinterpret_cast(this); +} + +IPCProcessSkeletonInterfaceMock::~IPCProcessSkeletonInterfaceMock() +{ + g_interface = nullptr; +} + +static IPCProcessSkeletonInterface *GetIPCProcessSkeletonInterface() +{ + return reinterpret_cast(g_interface); +} + +extern "C" { +bool IPCProcessSkeleton::IsSameRemoteObject(IRemoteObject *stub, int pid, int uid, uint32_t tokenId, + const std::string &deviceId, const std::shared_ptr &auth) +{ + if (g_interface == nullptr) { + return false; + } + return GetIPCProcessSkeletonInterface()->IsSameRemoteObject(stub, pid, uid, tokenId, deviceId, auth); +} +} + +void AddDataThreadInWaitFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + std::thread t([current] { + std::thread::id threadId = std::this_thread::get_id(); + current->AddDataThreadInWait(threadId); + }); + + auto startTime = std::chrono::steady_clock::now(); + auto timeoutDuration = std::chrono::seconds(TIMEOUT_SECOND); + std::thread::id threadId = t.get_id(); + std::shared_ptr threadLockInfo = current->QueryThreadLockInfo(threadId); + while (threadLockInfo == nullptr) { + threadLockInfo = current->QueryThreadLockInfo(threadId); + auto currentTime = std::chrono::steady_clock::now(); + if (currentTime - startTime >= timeoutDuration) { + break; + } + } + current->WakeUpDataThread(threadId); + t.join(); +} + +void AttachCommAuthInfoFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + int pid = provider.ConsumeIntegral(); + int uid = provider.ConsumeIntegral(); + uint32_t tokenId = provider.ConsumeIntegral(); + std::string deviceId = provider.ConsumeRandomLengthString(MAX_STR_LEN); + sptr stubObject = sptr::MakeSptr(); + if (stubObject == nullptr) { + return; + } + NiceMock mock; + EXPECT_CALL(mock, IsSameRemoteObject(_, _, _, _, _, _)).WillOnce(Return(true)); + // call twice + current->AttachCommAuthInfo(stubObject.GetRefPtr(), pid, uid, tokenId, deviceId); + current->AttachCommAuthInfo(stubObject.GetRefPtr(), pid, uid, tokenId, deviceId); +} + +void StubDetachDBinderSessionFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + uint32_t handle = provider.ConsumeIntegral(); + uint32_t tokenId; + current->dbinderSessionObjects_.insert(std::make_pair(handle, nullptr)); + current->StubDetachDBinderSession(handle, tokenId); +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + FuzzedDataProvider provider(data, size); + OHOS::AddDataThreadInWaitFuzzTest(provider); + OHOS::AttachCommAuthInfoFuzzTest(provider); + OHOS::StubDetachDBinderSessionFuzzTest(provider); + return 0; +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/project.xml b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/project.xml new file mode 100644 index 00000000..226522bd --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock003_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 10000 + + 300 + + 4096 + + diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/BUILD.gn b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/BUILD.gn new file mode 100644 index 00000000..e018b1d5 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/BUILD.gn @@ -0,0 +1,44 @@ +# 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("//build/config/features.gni") +import("//build/test.gni") +import("../../../../../../../../config.gni") +##############################fuzztest########################################## +ohos_fuzztest("IPCProcessSkeletonMock004FuzzTest") { + module_out_path = "ipc/ipc" + fuzz_config_file = "../ipcprocessskeletonmock004_fuzzer" + defines = [ + "private = public", + "protected = public", + ] + include_dirs = [ + "../include", + "$IPC_ROOT_PATH/utils/include", + ] + sources = [ "ipcprocessskeletonmock004_fuzzer.cpp" ] + deps = [ + "$IPC_ROOT_PATH/interfaces/innerkits/ipc_single:ipc_single_test", + "$IPC_ROOT_PATH/ipc/native/src/core:ipc_common", + ] + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:libdbinder", + "ipc:ipc_core", + "googletest:gmock", + "googletest:gtest", + ] + resource_config_file = "$IPC_ROOT_PATH/test/resource/ipc/ohos_test.xml" +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/corpus/init b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/corpus/init new file mode 100644 index 00000000..7ade8a0f --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * 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. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/ipcprocessskeletonmock004_fuzzer.cpp b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/ipcprocessskeletonmock004_fuzzer.cpp new file mode 100644 index 00000000..54406d11 --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/ipcprocessskeletonmock004_fuzzer.cpp @@ -0,0 +1,115 @@ +/* + * 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 "ipcprocessskeletonmock_fuzzer.h" + +using namespace testing; +using namespace testing::ext; + +namespace OHOS { +class IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterface() {}; + virtual ~IPCProcessSkeletonInterface() {}; + + virtual int32_t StartServerListener(const std::string &ownName) = 0; +}; + +class IPCProcessSkeletonInterfaceMock : public IPCProcessSkeletonInterface { +public: + IPCProcessSkeletonInterfaceMock(); + ~IPCProcessSkeletonInterfaceMock() override; + + MOCK_METHOD(int32_t, StartServerListener, (const std::string &ownName), (override)); +}; + +static void *g_interface = nullptr; + +IPCProcessSkeletonInterfaceMock::IPCProcessSkeletonInterfaceMock() +{ + g_interface = reinterpret_cast(this); +} + +IPCProcessSkeletonInterfaceMock::~IPCProcessSkeletonInterfaceMock() +{ + g_interface = nullptr; +} + +static IPCProcessSkeletonInterface *GetIPCProcessSkeletonInterface() +{ + return reinterpret_cast(g_interface); +} + +extern "C" { +int32_t DatabusSocketListener::StartServerListener(const std::string &ownName) +{ + if (g_interface == nullptr) { + return -1; + } + return GetIPCProcessSkeletonInterface()->StartServerListener(ownName); +} +} + +void AddSendThreadInWaitFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + uint64_t seqNumber = provider.ConsumeIntegral(); + int userWaitTime = provider.ConsumeIntegral(); + current->AddSendThreadInWait(seqNumber, nullptr, userWaitTime); +} + +void QueryStubByIndexFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + uint64_t stubIndex = provider.ConsumeIntegral(); + current->stubObjects_.insert(std::pair(stubIndex, nullptr)); + current->QueryStubByIndex(stubIndex); +} + +void CreateSoftbusServerFuzzTest(FuzzedDataProvider &provider) +{ + IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); + if (current == nullptr) { + return; + } + std::string serverName = provider.ConsumeRandomLengthString(MAX_STR_LEN); + current->sessionName_ = serverName; + current->listenSocketId_ = 1; + current->CreateSoftbusServer(serverName); + + current->listenSocketId_ = -1; + NiceMock mock; + EXPECT_CALL(mock, StartServerListener(serverName)).WillRepeatedly(Return(1)); + current->sessionName_ = provider.ConsumeRandomLengthString(MAX_STR_LEN); + current->CreateSoftbusServer(serverName); +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + FuzzedDataProvider provider(data, size); + OHOS::AddSendThreadInWaitFuzzTest(provider); + OHOS::QueryStubByIndexFuzzTest(provider); + OHOS::CreateSoftbusServerFuzzTest(provider); + return 0; +} diff --git a/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/project.xml b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/project.xml new file mode 100644 index 00000000..226522bd --- /dev/null +++ b/test/fuzztest/ipc/native/src/mock/ipcprocessskeletonmock/ipcprocessskeletonmock004_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 10000 + + 300 + + 4096 + + diff --git a/test/resource/ipc/ohos_test.xml b/test/resource/ipc/ohos_test.xml index 57242401..07d2916b 100644 --- a/test/resource/ipc/ohos_test.xml +++ b/test/resource/ipc/ohos_test.xml @@ -311,6 +311,30 @@