diff --git a/test/fuzztest/stubhandlemarkprocessed_fuzzer/BUILD.gn b/test/fuzztest/stubhandlemarkprocessed_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..bcf23c897b30bdd99d2f7c794bf5ffb99629a8ed
--- /dev/null
+++ b/test/fuzztest/stubhandlemarkprocessed_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandleMarkProcessedFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandlemarkprocessed_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandlemarkprocessed_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandleMarkProcessedFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandlemarkprocessed_fuzzer/corpus/init b/test/fuzztest/stubhandlemarkprocessed_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandlemarkprocessed_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandlemarkprocessed_fuzzer/project.xml b/test/fuzztest/stubhandlemarkprocessed_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandlemarkprocessed_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandlemarkprocessed_fuzzer/stubhandlemarkprocessed_fuzzer.cpp b/test/fuzztest/stubhandlemarkprocessed_fuzzer/stubhandlemarkprocessed_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c527c9a37315c67ed8ec7abbcddc8f70b156c83a
--- /dev/null
+++ b/test/fuzztest/stubhandlemarkprocessed_fuzzer/stubhandlemarkprocessed_fuzzer.cpp
@@ -0,0 +1,52 @@
+/*
+ * 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
+#include "stubhandlemarkprocessed_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandleMarkProcessedFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+ int32_t eventType = provider.ConsumeIntegral();
+ int32_t eventId = provider.ConsumeIntegral();
+
+ MMIService::GetInstance()->MarkProcessed(eventType, eventId);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandleMarkProcessedFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandlemarkprocessed_fuzzer/stubhandlemarkprocessed_fuzzer.h b/test/fuzztest/stubhandlemarkprocessed_fuzzer/stubhandlemarkprocessed_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..df5fa8423c3ed1ba90e5035927cd18db22e3feab
--- /dev/null
+++ b/test/fuzztest/stubhandlemarkprocessed_fuzzer/stubhandlemarkprocessed_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandlemarkprocessed_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandlemovemouse_fuzzer/BUILD.gn b/test/fuzztest/stubhandlemovemouse_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..c90cb9215afaae768931408a5f9683370fd60f9f
--- /dev/null
+++ b/test/fuzztest/stubhandlemovemouse_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandleMoveMouseFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandlemovemouse_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandlemovemouse_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandleMoveMouseFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandlemovemouse_fuzzer/corpus/init b/test/fuzztest/stubhandlemovemouse_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandlemovemouse_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandlemovemouse_fuzzer/project.xml b/test/fuzztest/stubhandlemovemouse_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandlemovemouse_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandlemovemouse_fuzzer/stubhandlemovemouse_fuzzer.cpp b/test/fuzztest/stubhandlemovemouse_fuzzer/stubhandlemovemouse_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..33c572518023a6fb2facbb371bf99fa6b3eaa1e9
--- /dev/null
+++ b/test/fuzztest/stubhandlemovemouse_fuzzer/stubhandlemovemouse_fuzzer.cpp
@@ -0,0 +1,53 @@
+/*
+ * 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
+#include "stubhandlemovemouse_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandleMoveMouseFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+
+ int32_t offsetX = provider.ConsumeIntegral();
+ int32_t offsetY = provider.ConsumeIntegral();
+
+ MMIService::GetInstance()->MoveMouseEvent(offsetX, offsetY);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandleMoveMouseFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandlemovemouse_fuzzer/stubhandlemovemouse_fuzzer.h b/test/fuzztest/stubhandlemovemouse_fuzzer/stubhandlemovemouse_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..31c299b581b37625a960cfd97130258c0e2d78d0
--- /dev/null
+++ b/test/fuzztest/stubhandlemovemouse_fuzzer/stubhandlemovemouse_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandlemovemouse_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandleongetdevice_fuzzer/BUILD.gn b/test/fuzztest/stubhandleongetdevice_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..13c9792dd733737195b8c3ce68fdd76dfb355616
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdevice_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandleOnGetDeviceFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandleongetdevice_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandleongetdevice_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandleOnGetDeviceFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandleongetdevice_fuzzer/corpus/init b/test/fuzztest/stubhandleongetdevice_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdevice_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandleongetdevice_fuzzer/project.xml b/test/fuzztest/stubhandleongetdevice_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdevice_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandleongetdevice_fuzzer/stubhandleongetdevice_fuzzer.cpp b/test/fuzztest/stubhandleongetdevice_fuzzer/stubhandleongetdevice_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8cc831e9b8661ebe99e76578aba2bfd2242331ae
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdevice_fuzzer/stubhandleongetdevice_fuzzer.cpp
@@ -0,0 +1,53 @@
+/*
+ * 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
+#include "stubhandleongetdevice_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandleOnGetDeviceFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+
+ int32_t deviceId = provider.ConsumeIntegral();
+ std::shared_ptr inputDevice = std::make_shared();
+
+ MMIService::GetInstance()->OnGetDevice(deviceId, inputDevice);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandleOnGetDeviceFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandleongetdevice_fuzzer/stubhandleongetdevice_fuzzer.h b/test/fuzztest/stubhandleongetdevice_fuzzer/stubhandleongetdevice_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd97b6169d1b5e3cfbf97c828edc6faf6e703a08
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdevice_fuzzer/stubhandleongetdevice_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandleongetdevice_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandleongetdeviceids_fuzzer/BUILD.gn b/test/fuzztest/stubhandleongetdeviceids_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..462e1e421e143cc69b5fb2205aef7ed48aac73c4
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdeviceids_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandleOnGetDeviceIdsFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandleongetdeviceids_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandleongetdeviceids_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandleOnGetDeviceIdsFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandleongetdeviceids_fuzzer/corpus/init b/test/fuzztest/stubhandleongetdeviceids_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdeviceids_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandleongetdeviceids_fuzzer/project.xml b/test/fuzztest/stubhandleongetdeviceids_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdeviceids_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandleongetdeviceids_fuzzer/stubhandleongetdeviceids_fuzzer.cpp b/test/fuzztest/stubhandleongetdeviceids_fuzzer/stubhandleongetdeviceids_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..21aaccbd8a0647e539ba1dde857d3dc8c0a69956
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdeviceids_fuzzer/stubhandleongetdeviceids_fuzzer.cpp
@@ -0,0 +1,56 @@
+/*
+ * 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
+#include "stubhandleongetdeviceids_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandleOnGetDeviceIdsFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+ std::vector ids = {
+ provider.ConsumeIntegral(),
+ provider.ConsumeIntegral(),
+ provider.ConsumeIntegral(),
+ provider.ConsumeIntegral()
+ };
+
+ MMIService::GetInstance()->OnGetDeviceIds(ids);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandleOnGetDeviceIdsFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandleongetdeviceids_fuzzer/stubhandleongetdeviceids_fuzzer.h b/test/fuzztest/stubhandleongetdeviceids_fuzzer/stubhandleongetdeviceids_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..c0d75e0207914c0ce41e962bd707baf3967af23e
--- /dev/null
+++ b/test/fuzztest/stubhandleongetdeviceids_fuzzer/stubhandleongetdeviceids_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandleongetdeviceids_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandleonsupportkeys_fuzzer/BUILD.gn b/test/fuzztest/stubhandleonsupportkeys_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..0855ec75370033f9d32396b885d3165565c45a60
--- /dev/null
+++ b/test/fuzztest/stubhandleonsupportkeys_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandleOnSupportKeysFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandleonsupportkeys_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandleonsupportkeys_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandleOnSupportKeysFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandleonsupportkeys_fuzzer/corpus/init b/test/fuzztest/stubhandleonsupportkeys_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandleonsupportkeys_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandleonsupportkeys_fuzzer/project.xml b/test/fuzztest/stubhandleonsupportkeys_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandleonsupportkeys_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandleonsupportkeys_fuzzer/stubhandleonsupportkeys_fuzzer.cpp b/test/fuzztest/stubhandleonsupportkeys_fuzzer/stubhandleonsupportkeys_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ba9da6209fd51bb08c72221b0885064a5ef33547
--- /dev/null
+++ b/test/fuzztest/stubhandleonsupportkeys_fuzzer/stubhandleonsupportkeys_fuzzer.cpp
@@ -0,0 +1,61 @@
+/*
+ * 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
+#include "stubhandleonsupportkeys_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandleOnSupportKeysFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+ int32_t deviceId = provider.ConsumeIntegral();
+ std::vector keys = {
+ provider.ConsumeIntegral(),
+ provider.ConsumeIntegral(),
+ provider.ConsumeIntegral(),
+ provider.ConsumeIntegral()
+ };
+ std::vector keystroke = {
+ provider.ConsumeBool(),
+ provider.ConsumeBool()
+ };
+
+ MMIService::GetInstance()->OnSupportKeys(deviceId, keys, keystroke);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandleOnSupportKeysFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandleonsupportkeys_fuzzer/stubhandleonsupportkeys_fuzzer.h b/test/fuzztest/stubhandleonsupportkeys_fuzzer/stubhandleonsupportkeys_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae7b4f76ae8ec549e7edc437ad60927412087e61
--- /dev/null
+++ b/test/fuzztest/stubhandleonsupportkeys_fuzzer/stubhandleonsupportkeys_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandleonsupportkeys_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandlepinchswitch_fuzzer/BUILD.gn b/test/fuzztest/stubhandlepinchswitch_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..f28065f7f857d7372414ac65e1fb11a21e0e34cd
--- /dev/null
+++ b/test/fuzztest/stubhandlepinchswitch_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandlePinchSwitchFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandlepinchswitch_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandlepinchswitch_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandlePinchSwitchFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandlepinchswitch_fuzzer/corpus/init b/test/fuzztest/stubhandlepinchswitch_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandlepinchswitch_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandlepinchswitch_fuzzer/project.xml b/test/fuzztest/stubhandlepinchswitch_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandlepinchswitch_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandlepinchswitch_fuzzer/stubhandlepinchswitch_fuzzer.cpp b/test/fuzztest/stubhandlepinchswitch_fuzzer/stubhandlepinchswitch_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4dabab460ec1b2c6a98e1ea894c0917e5cacc5da
--- /dev/null
+++ b/test/fuzztest/stubhandlepinchswitch_fuzzer/stubhandlepinchswitch_fuzzer.cpp
@@ -0,0 +1,54 @@
+/*
+ * 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
+#include "stubhandlepinchswitch_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandlePinchSwitchFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+
+ bool switchFlag = provider.ConsumeBool();
+
+ MMIService::GetInstance()->SetTouchpadPinchSwitch(switchFlag);
+ MMIService::GetInstance()->ReadTouchpadPinchSwitch(switchFlag);
+ MMIService::GetInstance()->GetTouchpadPinchSwitch(switchFlag);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandlePinchSwitchFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandlepinchswitch_fuzzer/stubhandlepinchswitch_fuzzer.h b/test/fuzztest/stubhandlepinchswitch_fuzzer/stubhandlepinchswitch_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..6f0f55253df818120f69810910f980ad379cbf63
--- /dev/null
+++ b/test/fuzztest/stubhandlepinchswitch_fuzzer/stubhandlepinchswitch_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandlepinchswitch_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandlepointerevent_fuzzer/BUILD.gn b/test/fuzztest/stubhandlepointerevent_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..e85a1b1e34a5aa4dc93cbc69eb9b167ac6e7f1d4
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerevent_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandlePointerEventFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandlepointerevent_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandlepointerevent_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandlePointerEventFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandlepointerevent_fuzzer/corpus/init b/test/fuzztest/stubhandlepointerevent_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerevent_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandlepointerevent_fuzzer/project.xml b/test/fuzztest/stubhandlepointerevent_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerevent_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandlepointerevent_fuzzer/stubhandlepointerevent_fuzzer.cpp b/test/fuzztest/stubhandlepointerevent_fuzzer/stubhandlepointerevent_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e2ec57ce53906160dc4fc8c668293ea329ec56ae
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerevent_fuzzer/stubhandlepointerevent_fuzzer.cpp
@@ -0,0 +1,59 @@
+/*
+ * 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
+#include "stubhandlepointerevent_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandlePointerEventFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+
+ std::shared_ptr pointerEvent = PointerEvent::Create();
+ pointerEvent->pointerAction_ = provider.ConsumeIntegral();
+ pointerEvent->originPointerAction_ = provider.ConsumeIntegral();
+ pointerEvent->buttonId_ = provider.ConsumeIntegral();
+ pointerEvent->fingerCount_ = provider.ConsumeIntegral();
+ pointerEvent->pullId_ = provider.ConsumeIntegral();
+ bool isNativeInject = provider.ConsumeBool();
+ int32_t useCoordinate = provider.ConsumeIntegral();
+
+ MMIService::GetInstance()->InjectPointerEvent(*pointerEvent.get(), isNativeInject, useCoordinate);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandlePointerEventFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandlepointerevent_fuzzer/stubhandlepointerevent_fuzzer.h b/test/fuzztest/stubhandlepointerevent_fuzzer/stubhandlepointerevent_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..83a3efa535f2cab5278e2d59d89f59074bc601da
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerevent_fuzzer/stubhandlepointerevent_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandlepointerevent_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H
diff --git a/test/fuzztest/stubhandlepointerspeed_fuzzer/BUILD.gn b/test/fuzztest/stubhandlepointerspeed_fuzzer/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..1ded793f5fb44150ca4a110f07bc39309bbc05c5
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerspeed_fuzzer/BUILD.gn
@@ -0,0 +1,108 @@
+# 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("../../../multimodalinput_mini.gni")
+module_output_path = "input/input"
+
+##############################fuzztest##########################################
+ohos_fuzztest("StubHandlePointerSpeedFuzzTest") {
+ module_out_path = module_output_path
+ fuzz_config_file = "${mmi_path}/test/fuzztest/stubhandlepointerspeed_fuzzer"
+ include_dirs = [
+ "${mmi_path}/interfaces/util/common/include",
+ "${mmi_path}/service/connect_manager/include",
+ "${mmi_path}/service/filter/include/",
+ "${mmi_path}/service/nap_process/include/",
+ "${mmi_path}/service/module_loader/include",
+ "${mmi_path}/service/delegate_task/include",
+ "${mmi_path}/service/event_handler/include",
+ "${mmi_path}/service/event_dispatch/include",
+ "${mmi_path}/service/interceptor/include",
+ "${mmi_path}/service/joystick/include",
+ "${mmi_path}/service/monitor/include",
+ "${mmi_path}/service/key_event_normalize/include",
+ "${mmi_path}/service/window_manager/include",
+ "${mmi_path}/service/key_command/include",
+ "${mmi_path}/service/subscriber/include",
+ "${mmi_path}/service/mouse_event_normalize/include",
+ "${mmi_path}/service/timer_manager/include",
+ "${mmi_path}/service/libinput_adapter/include",
+ "${mmi_path}/service/message_handle/include",
+ "${mmi_path}/service/touch_event_normalize/include",
+ "${mmi_path}/util/common/include",
+ "${mmi_path}/common/anco/comm/include",
+ ]
+ cflags = [
+ "-g",
+ "-O0",
+ "-Wno-unused-variable",
+ "-fno-omit-frame-pointer",
+ "-Dprivate=public",
+ "-Dprotected=public",
+ ]
+
+ configs = [
+ "${mmi_path}/service/filter:mmi_event_filter_config",
+ "${mmi_path}/service/connect_manager:mmi_connect_manager_config",
+ "${mmi_path}/common/anco/comm:mmi_anco_channel_config",
+ ]
+
+ sources = [ "stubhandlepointerspeed_fuzzer.cpp" ]
+
+ deps = [
+ "${mmi_path}/frameworks/proxy:libmmi-client",
+ "${mmi_path}/frameworks/proxy:libmmi-common",
+ "${mmi_path}/service:libmmi-server",
+ "${mmi_path}/util:libmmi-util",
+ ]
+
+ external_deps = [
+ "ability_runtime:app_manager",
+ "cJSON:cjson",
+ "c_utils:utils",
+ "data_share:datashare_consumer",
+ "graphic_2d:2d_graphics",
+ "graphic_2d:librender_service_base",
+ "graphic_2d:librender_service_client",
+ "hilog:libhilog",
+ "image_framework:image_native",
+ "ipc:ipc_single",
+ "libinput:libinput-third-mmi",
+ "preferences:native_preferences",
+ "safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
+ "window_manager:libwm",
+ ]
+
+ if (security_component_enable) {
+ external_deps += [ "security_component_manager:libsecurity_component_sdk" ]
+ }
+
+ if (enable_player_framework) {
+ external_deps += [ "player_framework:media_client" ]
+ }
+}
+
+###############################################################################
+group("fuzztest") {
+ testonly = true
+ deps = []
+ deps += [
+ # deps file
+ ":StubHandlePointerSpeedFuzzTest",
+ ]
+}
+###############################################################################
diff --git a/test/fuzztest/stubhandlepointerspeed_fuzzer/corpus/init b/test/fuzztest/stubhandlepointerspeed_fuzzer/corpus/init
new file mode 100644
index 0000000000000000000000000000000000000000..65af8ee8d11bf23407ea34d4de49f7cbb6a2b791
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerspeed_fuzzer/corpus/init
@@ -0,0 +1,14 @@
+# 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/stubhandlepointerspeed_fuzzer/project.xml b/test/fuzztest/stubhandlepointerspeed_fuzzer/project.xml
new file mode 100644
index 0000000000000000000000000000000000000000..66e1dcac475475fb101b6f8670ec699e6e9696aa
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerspeed_fuzzer/project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ 1000
+
+ 300
+
+ 4096
+
+
diff --git a/test/fuzztest/stubhandlepointerspeed_fuzzer/stubhandlepointerspeed_fuzzer.cpp b/test/fuzztest/stubhandlepointerspeed_fuzzer/stubhandlepointerspeed_fuzzer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b0a4b2fcfb1e2779b1980782e66d8616a32dab19
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerspeed_fuzzer/stubhandlepointerspeed_fuzzer.cpp
@@ -0,0 +1,54 @@
+/*
+ * 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
+#include "stubhandlepointerspeed_fuzzer.h"
+
+#include "mmi_service.h"
+#include "multimodal_input_connect_stub.h"
+
+#undef MMI_LOG_TAG
+#define MMI_LOG_TAG "StubHandleAllocSocketFdFuzzTest"
+
+class UDSSession;
+using SessionPtr = std::shared_ptr;
+
+namespace OHOS {
+namespace MMI {
+
+void StubHandlePointerSpeedFuzzTest(const uint8_t *data, size_t size)
+{
+ FuzzedDataProvider provider(data, size);
+
+ int32_t speed = provider.ConsumeIntegral();
+
+ MMIService::GetInstance()->SetTouchpadPointerSpeed(speed);
+ MMIService::GetInstance()->ReadTouchpadPointerSpeed(speed);
+ MMIService::GetInstance()->GetTouchpadPointerSpeed(speed);
+}
+} // MMI
+} // OHOS
+
+/* Fuzzer entry point */
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ /* Run your code on data */
+ if (data == nullptr) {
+ return 0;
+ }
+
+ OHOS::MMI::StubHandlePointerSpeedFuzzTest(data, size);
+ return 0;
+}
diff --git a/test/fuzztest/stubhandlepointerspeed_fuzzer/stubhandlepointerspeed_fuzzer.h b/test/fuzztest/stubhandlepointerspeed_fuzzer/stubhandlepointerspeed_fuzzer.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac8676b577f2e0be43859832b785ab70086d4a11
--- /dev/null
+++ b/test/fuzztest/stubhandlepointerspeed_fuzzer/stubhandlepointerspeed_fuzzer.h
@@ -0,0 +1,21 @@
+/*
+ * 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 STUBHANDLEALLOCSOCAETFD_FUZZER_H
+#define STUBHANDLEALLOCSOCAETFD_FUZZER_H
+
+#define FUZZ_PROJECT_NAME "stubhandlepointerspeed_fuzzer"
+
+#endif // STUBHANDLEALLOCSOCAETFD_FUZZER_H