diff --git a/framework/test/fuzztest/BUILD.gn b/framework/test/fuzztest/BUILD.gn
index 5abca4bb8240a729ce700b8deefc81830fc45caa..c9150449c32e3978ea1a2755bd0b5244b8f5acce 100644
--- a/framework/test/fuzztest/BUILD.gn
+++ b/framework/test/fuzztest/BUILD.gn
@@ -15,8 +15,6 @@ group("hdf_framework_fuzztest") {
"devmgr_service_fuzzer:ServiceFuzzTest",
"devmgrservicestub_fuzzer:DevmgrServiceStubFuzzTest",
"devsvcmanagerstub_fuzzer:DevSvcManagerStubFuzzTest",
- "framework_fuzzer/hcs_fuzzer:HdfHcsFuzzTest",
- "framework_fuzzer/support/posix_fuzzer:HdfPosixFuzzTest",
"ioservice_fuzzer/ioserviceadapterobtain_fuzzer:IoserviceAdapterObtainFuzzTest",
"ioservice_fuzzer/ioservicebind_fuzzer:IoserviceBindFuzzTest",
"ioservice_fuzzer/ioservicegrouplisten_fuzzer:IoserviceGroupListenFuzzTest",
@@ -29,8 +27,6 @@ group("hdf_framework_fuzztest") {
"servmgr_cpp_fuzzer/servstatlistenerstub_fuzzer:ServStatListenerStubFuzzTest",
"servmgr_cpp_fuzzer/unregisterservicestatuslistener_fuzzer:UnregisterServiceStatusListenerFuzzTest",
"syscall_fuzzer/syscall_fuzzer:SyscallFuzzTest",
- "uhdf2_ipc_fuzzer/ipc_fuzzer:HdfIpcFuzzTest",
"uhdf2_utils_fuzzer/hdfxcollie_fuzzer:HdfXCollieFuzzTest",
- "uhdf2_utils_fuzzer/inner_api_utils_fuzzer:HdfInnerApiUtilsFuzzTest",
]
}
diff --git a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/BUILD.gn b/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/BUILD.gn
deleted file mode 100644
index 95b953bd13b053abfac255bf244bf43586e7edad..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/BUILD.gn
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-import("//build/config/features.gni")
-import("//build/ohos.gni")
-import("//build/test.gni")
-
-module_output_path = "hdf_core/hdf_core/framework_fuzzer"
-
-hdf_framework_path = "../../../../../framework"
-hdf_uhdf_path = "../../../../../adapter/uhdf2"
-
-ohos_fuzztest("HdfHcsFuzzTest") {
- module_out_path = module_output_path
-
- fuzz_config_file =
- "$hdf_framework_path/test/fuzztest/framework_fuzzer/hcs_fuzzer"
-
- include_dirs = [ "$hdf_uhdf_path/utils/include" ]
-
- sources = [ "hcs_fuzzer.cpp" ]
-
- deps = [
- "$hdf_uhdf_path/pub_utils:libpub_utils",
- "$hdf_uhdf_path/utils:libhdf_utils",
- ]
-
- external_deps = [
- "c_utils:utils",
- "hilog:libhilog",
- ]
-}
-
-group("fuzztest") {
- testonly = true
- deps = [ ":HdfHcsFuzzTest" ]
-}
diff --git a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/corpus/init b/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/corpus/init
deleted file mode 100644
index f707fb4e4acfe262dfeb05dbbae64043e18526fb..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/corpus/init
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-FUZZ
\ No newline at end of file
diff --git a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/hcs_fuzzer.cpp b/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/hcs_fuzzer.cpp
deleted file mode 100644
index ed994643027b1154e50e05e03f2e7ac2c21c123b..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/hcs_fuzzer.cpp
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#include "hcs_fuzzer.h"
-
-#include "hcs_tree_if.h"
-#include "hdf_base.h"
-#include "hdf_core_log.h"
-#include "securec.h"
-
-namespace OHOS {
-constexpr size_t THRESHOLD = 10;
-#define HDF_LOG_TAG hcs_fuzzer_fuzzer
-
-enum FuncId {
- HCS_HCSGETBOOL,
- HCS_HCSGETUINT8,
- HCS_HCSGETUINT32,
- HCS_HCSGETUINT64,
- HCS_HCSGETUINT8ARRAYELEM,
- HCS_HCSGETUINT16ARRAYELEM,
- HCS_HCSGETUINT32ARRAYELEM,
- HCS_HCSGETUINT64ARRAYELEM,
- HCS_END
-};
-
-void FuncHcsGetBool(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- HcsGetBool(&node, attrName);
- return;
-}
-
-void FuncHcsGetUint8(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint8_t value = 0;
- uint8_t def = 0;
-
- HcsGetUint8(&node, attrName, &value, def);
- return;
-}
-
-void FuncHcsGetUint32(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint32_t value = 0;
- uint32_t def = 0;
-
- HcsGetUint32(&node, attrName, &value, def);
- return;
-}
-
-void FuncHcsGetUint64(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint64_t value = 0;
- uint64_t def = 0;
-
- HcsGetUint64(&node, attrName, &value, def);
- return;
-}
-
-void FuncHcsGetUint8ArrayElem(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint32_t index = 0;
- uint8_t value = 0;
- uint8_t def = 0;
-
- HcsGetUint8ArrayElem(&node, attrName, index, &value, def);
- return;
-}
-
-void FuncHcsGetUint16ArrayElem(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint32_t index = 0;
- uint16_t value = 0;
- uint16_t def = 0;
-
- HcsGetUint16ArrayElem(&node, attrName, index, &value, def);
- return;
-}
-
-void FuncHcsGetUint32ArrayElem(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint32_t index = 0;
- uint32_t value = 0;
- uint32_t def = 0;
-
- HcsGetUint32ArrayElem(&node, attrName, index, &value, def);
- return;
-}
-
-void FuncHcsGetUint64ArrayElem(const uint8_t *data, size_t size)
-{
- if (size < sizeof(struct DeviceResourceNode)) {
- return;
- }
-
- struct DeviceResourceNode node;
- size_t sz = sizeof(struct DeviceResourceNode);
- if (memcpy_s(&node, sz, data, sz) != EOK) {
- return;
- }
- node.name = "nothing";
- node.attrData = NULL;
- node.parent = NULL;
- node.child = NULL;
- node.sibling = NULL;
- const char *attrName = "nothing";
- uint32_t index = 0;
- uint64_t value = 0;
- uint64_t def = 0;
-
- HcsGetUint64ArrayElem(&node, attrName, index, &value, def);
- return;
-}
-
-void FuncSwitch(uint32_t cmd, const uint8_t *data, size_t size)
-{
- switch (cmd) {
- case HCS_HCSGETBOOL: {
- FuncHcsGetBool(data, size);
- break;
- }
- case HCS_HCSGETUINT8: {
- FuncHcsGetUint8(data, size);
- break;
- }
- case HCS_HCSGETUINT32: {
- FuncHcsGetUint32(data, size);
- break;
- }
- case HCS_HCSGETUINT64: {
- FuncHcsGetUint64(data, size);
- break;
- }
- case HCS_HCSGETUINT8ARRAYELEM: {
- FuncHcsGetUint8ArrayElem(data, size);
- break;
- }
- case HCS_HCSGETUINT16ARRAYELEM: {
- FuncHcsGetUint16ArrayElem(data, size);
- break;
- }
- case HCS_HCSGETUINT32ARRAYELEM: {
- FuncHcsGetUint32ArrayElem(data, size);
- break;
- }
- case HCS_HCSGETUINT64ARRAYELEM: {
- FuncHcsGetUint64ArrayElem(data, size);
- break;
- }
- default:
- return;
- }
-}
-
-void TraverseAllFunc(const uint8_t *data, size_t size)
-{
- for (uint32_t cmd = 0; cmd < HCS_END; cmd++) {
- FuncSwitch(cmd, data, size);
- }
-}
-}
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
- if (size < OHOS::THRESHOLD) {
- return HDF_SUCCESS;
- }
-
- OHOS::TraverseAllFunc(data, size);
- return HDF_SUCCESS;
-}
diff --git a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/hcs_fuzzer.h b/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/hcs_fuzzer.h
deleted file mode 100644
index 008821b93a6f8b98f2b421d92ec4c4974f7c13f3..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/hcs_fuzzer.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#ifndef HDF_HCS_H
-#define HDF_HCS_H
-
-#define FUZZ_PROJECT_NAME "hcs_fuzzer"
-
-#endif // HDF_HCS_H
\ No newline at end of file
diff --git a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/project.xml b/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/project.xml
deleted file mode 100644
index c390575101bdbc1d0df5bd1e5ff4a077c888604d..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/hcs_fuzzer/project.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- 0
-
- 10
-
- 128
-
-
diff --git a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/BUILD.gn b/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/BUILD.gn
deleted file mode 100644
index 15803fc85fccb569f56c4c5f6be6ead409fd77d7..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/BUILD.gn
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-import("//build/config/features.gni")
-import("//build/ohos.gni")
-import("//build/test.gni")
-
-module_output_path = "hdf_core/hdf_core/framework_fuzzer"
-
-hdf_framework_path = "../../../../../../framework"
-hdf_uhdf_path = "../../../../../../adapter/uhdf2"
-
-ohos_fuzztest("HdfPosixFuzzTest") {
- module_out_path = module_output_path
-
- fuzz_config_file =
- "$hdf_framework_path/test/fuzztest/framework_fuzzer/support/posix_fuzzer"
-
- include_dirs = [ "$hdf_uhdf_path/utils/include" ]
-
- sources = [ "posix_fuzzer.cpp" ]
-
- deps = [
- "$hdf_uhdf_path/pub_utils:libpub_utils",
- "$hdf_uhdf_path/utils:libhdf_utils",
- ]
-
- external_deps = [
- "c_utils:utils",
- "hilog:libhilog",
- ]
-}
-
-group("fuzztest") {
- testonly = true
- deps = [ ":HdfPosixFuzzTest" ]
-}
diff --git a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/corpus/init b/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/corpus/init
deleted file mode 100644
index f707fb4e4acfe262dfeb05dbbae64043e18526fb..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/corpus/init
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-FUZZ
\ No newline at end of file
diff --git a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/posix_fuzzer.cpp b/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/posix_fuzzer.cpp
deleted file mode 100644
index 6836317e36d6e55db92cea804e589467d30a655d..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/posix_fuzzer.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#include "hdf_base.h"
-#include "hdf_core_log.h"
-#include "osal_mem.h"
-#include "osal_sem.h"
-#include "osal_time.h"
-#include "osal_spinlock.h"
-#include "posix_fuzzer.h"
-#include
-
-namespace OHOS {
-constexpr size_t THRESHOLD = 10;
-#define HDF_LOG_TAG posix_fuzzer
-
-enum FuncId {
- POSIX_OSALMEMALLOC,
- POSIX_OSALMEMCALLOC,
- POSIX_OSALMEMALLOCALIGN,
- POSIX_OSALSEMWAIT,
- POSIX_OSALSEMPOST,
- POSIX_OSALSPINLOCK,
- POSIX_OSALTIME,
- HCS_END
-};
-
-void FuncOsalMemAlloc(const uint8_t *data, size_t size)
-{
- if (size < sizeof(size_t)) {
- return;
- }
-
- size_t sz = *(size_t *)data;
- uint8_t *mem = (uint8_t *)OsalMemAlloc(sz);
- if (mem != nullptr) {
- OsalMemFree(mem);
- }
- return;
-}
-
-void FuncOsalMemCalloc(const uint8_t *data, size_t size)
-{
- if (size < sizeof(size_t)) {
- return;
- }
-
- size_t sz = *(size_t *)data;
- uint8_t *mem = (uint8_t *)OsalMemCalloc(sz);
- if (mem != nullptr) {
- OsalMemFree(mem);
- }
- return;
-}
-
-void FuncOsalMemAllocAlign(const uint8_t *data, size_t size)
-{
- if (size < sizeof(size_t)) {
- return;
- }
- size_t alignment = 8;
- size_t sz = 0;
-
- uint8_t *mem = (uint8_t *)OsalMemAllocAlign(alignment, sz);
- if (mem != nullptr) {
- OsalMemFree(mem);
- }
- const size_t NUM = 4;
- sz = NUM;
- mem = (uint8_t *)OsalMemAllocAlign(alignment, sz);
- if (mem != nullptr) {
- OsalMemFree(mem);
- }
- return;
-}
-
-void FuncOsalSemWait(const uint8_t *data, size_t size)
-{
- OsalSemWait(NULL, 0);
-
- struct OsalSem sem;
- OsalSemInit(&sem, 1);
- OsalSemWait(&sem, ~HDF_WAIT_FOREVER);
- OsalSemDestroy(&sem);
- return;
-}
-
-void FuncOsalSemPost(const uint8_t *data, size_t size)
-{
- struct OsalSem sem;
- OsalSemInit(&sem, 1);
- OsalSemPost(&sem);
- OsalSemDestroy(&sem);
- return;
-}
-
-void FuncOsalSpinLock(const uint8_t *data, size_t size)
-{
- OsalSpinInit(NULL);
- OsalSpinlock spinlock;
- OsalSpinInit(&spinlock);
- const uint32_t SLEEPTIME = 2000;
- std::thread thrd([&spinlock] {
- OsalMSleep(SLEEPTIME);
- OsalSpinUnlock(&spinlock);
- });
- OsalSpinLock(&spinlock);
- OsalSpinDestroy(&spinlock);
- thrd.join();
- return;
-}
-
-void FuncOsalTime(const uint8_t *data, size_t size)
-{
- OsalGetTime(NULL);
- OsalTimespec start, end, diff;
- OsalGetTime(&start);
- OsalGetTime(&end);
- OsalDiffTime(&start, &end, &diff);
- OsalUSleep(1);
- OsalUDelay(1);
- OsalMDelay(1);
- uint64_t st = OsalGetSysTimeMs();
- (void)st;
- return;
-}
-
-void FuncSwitch(uint32_t cmd, const uint8_t *data, size_t size)
-{
- switch (cmd) {
- case POSIX_OSALMEMALLOC: {
- FuncOsalMemAlloc(data, size);
- break;
- }
- case POSIX_OSALMEMCALLOC: {
- FuncOsalMemCalloc(data, size);
- break;
- }
- case POSIX_OSALMEMALLOCALIGN: {
- FuncOsalMemAllocAlign(data, size);
- break;
- }
- case POSIX_OSALSEMWAIT: {
- FuncOsalSemWait(data, size);
- break;
- }
- case POSIX_OSALSEMPOST: {
- FuncOsalSemPost(data, size);
- break;
- }
- case POSIX_OSALSPINLOCK: {
- FuncOsalSpinLock(data, size);
- break;
- }
- case POSIX_OSALTIME: {
- FuncOsalTime(data, size);
- break;
- }
- default:
- return;
- }
-}
-
-void TraverseAllFunc(const uint8_t *data, size_t size)
-{
- for (uint32_t cmd = 0; cmd < HCS_END; cmd++) {
- FuncSwitch(cmd, data, size);
- }
-}
-}
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
- if (size < OHOS::THRESHOLD) {
- return HDF_SUCCESS;
- }
-
- OHOS::TraverseAllFunc(data, size);
- return HDF_SUCCESS;
-}
diff --git a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/posix_fuzzer.h b/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/posix_fuzzer.h
deleted file mode 100644
index c30667a392b7279b8a0f0c7e48c283a43b06fd97..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/posix_fuzzer.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#ifndef HDF_POSIX_H
-#define HDF_POSIX_H
-
-#define FUZZ_PROJECT_NAME "posix_fuzzer"
-
-#endif // HDF_POSIX_H
\ No newline at end of file
diff --git a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/project.xml b/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/project.xml
deleted file mode 100644
index c390575101bdbc1d0df5bd1e5ff4a077c888604d..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/framework_fuzzer/support/posix_fuzzer/project.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- 0
-
- 10
-
- 128
-
-
diff --git a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/BUILD.gn b/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/BUILD.gn
deleted file mode 100644
index 73c096d6888e3fbee3b699777de5dd1333e097c0..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/BUILD.gn
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-import("//build/config/features.gni")
-import("//build/ohos.gni")
-import("//build/test.gni")
-
-module_output_path = "hdf_core/hdf_core/uhdf2_ipc_fuzzer"
-
-hdf_framework_path = "../../../../../framework"
-hdf_uhdf_path = "../../../../../adapter/uhdf2"
-
-ohos_fuzztest("HdfIpcFuzzTest") {
- module_out_path = module_output_path
-
- fuzz_config_file =
- "$hdf_framework_path/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer"
-
- include_dirs = [
- "$hdf_uhdf_path/utils/include",
- "$hdf_uhdf_path/ipc/include",
- "$hdf_framework_path/include",
- ]
-
- sources = [ "hdfipc_fuzzer.cpp" ]
- deps = [ "../../../../../adapter/uhdf2/utils:libhdf_utils" ]
-
- external_deps = [
- "c_utils:utils",
- "hdf_core:libhdf_ipc_adapter",
- "hilog:libhilog",
- "ipc:ipc_single",
- ]
-}
-
-group("fuzztest") {
- testonly = true
- deps = [ ":HdfIpcFuzzTest" ]
-}
diff --git a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/corpus/init b/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/corpus/init
deleted file mode 100644
index f707fb4e4acfe262dfeb05dbbae64043e18526fb..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/corpus/init
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-FUZZ
\ No newline at end of file
diff --git a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/hdfipc_fuzzer.cpp b/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/hdfipc_fuzzer.cpp
deleted file mode 100644
index b127b6095cf707e2875471fc2964f275a665d431..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/hdfipc_fuzzer.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#include "hdfipc_fuzzer.h"
-#include "hdf_remote_adapter.h"
-#include "hdf_core_log.h"
-#include "parcel.h"
-#include
-#include
-#include "hdf_base.h"
-
-namespace OHOS {
-static void HdfIpcFuzzTest(const uint8_t *data, size_t size)
-{
- if (data == nullptr) {
- HDF_LOGE("%{public}s: data is nullptr!", __func__);
- }
-
- Parcel parcel;
- parcel.WriteBuffer(data, size);
- const char *interfaceName = parcel.ReadCString();
-
- struct HdfRemoteService *service = HdfRemoteAdapterObtain();
- if (service == nullptr) {
- HDF_LOGE("%{public}s: serviceSet is nullptr!", __func__);
- }
-
- HdfRemoteAdapterAddService(interfaceName, service);
- HdfRemoteAdapterGetService(interfaceName);
-
- struct HdfDeathRecipient* recipient = nullptr;
- HdfRemoteAdapterAddDeathRecipient(service, recipient);
- HdfRemoteAdapterRemoveDeathRecipient(service, recipient);
-}
-}
-
-/* Fuzzer entry point */
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
- /* Run your code on data */
- OHOS::HdfIpcFuzzTest(data, size);
- return HDF_SUCCESS;
-}
\ No newline at end of file
diff --git a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/hdfipc_fuzzer.h b/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/hdfipc_fuzzer.h
deleted file mode 100644
index ad1de3ab50f3965bfd1d2b02bacc5b9e66cdaca5..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/hdfipc_fuzzer.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#ifndef IPC_ONREMOTEREQUEST_FUZZER_H
-#define IPC_ONREMOTEREQUEST_FUZZER_H
-
-#define FUZZ_PROJECT_NAME "hdfipc_fuzzer"
-
-#endif // IPC_ONREMOTEREQUEST_FUZZER_H
\ No newline at end of file
diff --git a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/project.xml b/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/project.xml
deleted file mode 100644
index e47b18640e151ce8f11a708c2e2a7f209b166fb9..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_ipc_fuzzer/ipc_fuzzer/project.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- 1000
-
- 120
-
- 2048
-
-
diff --git a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/BUILD.gn b/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/BUILD.gn
deleted file mode 100644
index 52e359a4147d736a809cc4ea50bae3417fc3fb6b..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/BUILD.gn
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-import("//build/config/features.gni")
-import("//build/ohos.gni")
-import("//build/test.gni")
-
-module_output_path = "hdf_core/hdf_core/uhdf2_utils_fuzzer"
-
-hdf_framework_path = "../../../../../framework"
-hdf_uhdf_path = "../../../../../adapter/uhdf2"
-
-ohos_fuzztest("HdfInnerApiUtilsFuzzTest") {
- module_out_path = module_output_path
-
- fuzz_config_file = "$hdf_framework_path/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer"
-
- include_dirs = [ "$hdf_uhdf_path/utils/include" ]
-
- sources = [ "innerapi_utils_fuzzer.cpp" ]
-
- deps = [
- "$hdf_uhdf_path/pub_utils:libpub_utils",
- "$hdf_uhdf_path/utils:libhdf_utils",
- ]
-
- external_deps = [
- "c_utils:utils",
- "hilog:libhilog",
- ]
-}
-
-group("fuzztest") {
- testonly = true
- deps = [ ":HdfInnerApiUtilsFuzzTest" ]
-}
diff --git a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/corpus/init b/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/corpus/init
deleted file mode 100644
index f707fb4e4acfe262dfeb05dbbae64043e18526fb..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/corpus/init
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2024 Huawei Device Co., Ltd.
-#
-# HDF is dual licensed: you can use it either under the terms of
-# the GPL, or the BSD license, at your option.
-# See the LICENSE file in the root of this repository for complete details.
-
-FUZZ
\ No newline at end of file
diff --git a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/innerapi_utils_fuzzer.cpp b/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/innerapi_utils_fuzzer.cpp
deleted file mode 100644
index 8f88a1d19eff5017dc14aaa356a0024269b785eb..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/innerapi_utils_fuzzer.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#include "innerapi_utils_fuzzer.h"
-
-#include "hdf_dlist.h"
-#include "hdf_base.h"
-#include "hdf_core_log.h"
-
-namespace OHOS {
-constexpr size_t THRESHOLD = 10;
-#define HDF_LOG_TAG innerapi_utils_fuzzer
-
-enum FuncId {
- INNERAPI_UTILS_DLISTINSERTHEAD,
- INNERAPI_UTILS_END
-};
-
-void FuncdListInsertHead(const uint8_t *data, size_t size)
-{
- (void)data;
- constexpr uint16_t cnt = 2;
- if (size < sizeof(struct DListHead) * cnt) {
- return;
- }
-
- struct DListHead entry;
- struct DListHead head;
- DListHeadInit(&head);
- DListInsertHead(&entry, &head);
- return;
-}
-
-
-void FuncSwitch(uint32_t cmd, const uint8_t *data, size_t size)
-{
- switch (cmd) {
- case INNERAPI_UTILS_DLISTINSERTHEAD: {
- FuncdListInsertHead(data, size);
- break;
- }
-
- default:
- return;
- }
-}
-
-void TraverseAllFunc(const uint8_t *data, size_t size)
-{
- for (uint32_t cmd = 0; cmd < INNERAPI_UTILS_END; cmd++) {
- FuncSwitch(cmd, data, size);
- }
-}
-}
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
- if (size < OHOS::THRESHOLD) {
- return HDF_SUCCESS;
- }
-
- OHOS::TraverseAllFunc(data, size);
- return HDF_SUCCESS;
-}
diff --git a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/innerapi_utils_fuzzer.h b/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/innerapi_utils_fuzzer.h
deleted file mode 100644
index 3bf39b55e3df4529de70c386cbd604e914b7670d..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/innerapi_utils_fuzzer.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2024 Huawei Device Co., Ltd.
- *
- * HDF is dual licensed: you can use it either under the terms of
- * the GPL, or the BSD license, at your option.
- * See the LICENSE file in the root of this repository for complete details.
- */
-
-#ifndef HDF_INNER_API_UTILS_H
-#define HDF_INNER_API_UTILS_H
-
-#define FUZZ_PROJECT_NAME "innerapi_utils_fuzzer"
-
-#endif // HDF_INNER_API_UTILS_H
\ No newline at end of file
diff --git a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/project.xml b/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/project.xml
deleted file mode 100644
index c390575101bdbc1d0df5bd1e5ff4a077c888604d..0000000000000000000000000000000000000000
--- a/framework/test/fuzztest/uhdf2_utils_fuzzer/inner_api_utils_fuzzer/project.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- 0
-
- 10
-
- 128
-
-