From e07001c6ef0c78d20930acb9f67774905df86b7a Mon Sep 17 00:00:00 2001 From: li-tiangang4 Date: Wed, 10 Jul 2024 18:39:26 +0800 Subject: [PATCH] Delete invalid FUZZ Signed-off-by: li-tiangang4 --- test/fuzztest/BUILD.gn | 4 +- .../dinputreleasesink_fuzzer/BUILD.gn | 79 ------------------ .../dinputreleasesink_fuzzer/corpus/init | 14 ---- .../dinputreleasesink_fuzzer.cpp | 49 ----------- .../dinputreleasesink_fuzzer.h | 22 ----- .../dinputreleasesink_fuzzer/project.xml | 25 ------ .../dinputreleasesource_fuzzer/BUILD.gn | 81 ------------------- .../dinputreleasesource_fuzzer/corpus/init | 14 ---- .../dinputreleasesource_fuzzer.cpp | 49 ----------- .../dinputreleasesource_fuzzer.h | 22 ----- .../dinputreleasesource_fuzzer/project.xml | 25 ------ 11 files changed, 1 insertion(+), 383 deletions(-) delete mode 100644 test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn delete mode 100644 test/fuzztest/dinputreleasesink_fuzzer/corpus/init delete mode 100644 test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.cpp delete mode 100644 test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.h delete mode 100644 test/fuzztest/dinputreleasesink_fuzzer/project.xml delete mode 100644 test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn delete mode 100644 test/fuzztest/dinputreleasesource_fuzzer/corpus/init delete mode 100644 test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.cpp delete mode 100644 test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.h delete mode 100644 test/fuzztest/dinputreleasesource_fuzzer/project.xml diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index 55b7910..0e05126 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023 Huawei Device Co., Ltd. +# Copyright (c) 2022-2024 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 @@ -20,8 +20,6 @@ group("fuzztest") { "dinputinitsource_fuzzer:fuzztest", "dinputonsessionclosed_fuzzer:fuzztest", "dinputonsessionopend_fuzzer:fuzztest", - "dinputreleasesink_fuzzer:fuzztest", - "dinputreleasesource_fuzzer:fuzztest", "dinputsubscribelocaldh_fuzzer:fuzztest", "distributedinputclient_fuzzer:fuzztest", "distributedinputkit_fuzzer:fuzztest", diff --git a/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn b/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn deleted file mode 100644 index dee65b3..0000000 --- a/test/fuzztest/dinputreleasesink_fuzzer/BUILD.gn +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) 2021-2024 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("../../../distributedinput.gni") - -##############################fuzztest########################################## -ohos_fuzztest("DinputReleaseSinkFuzzTest") { - module_out_path = fuzz_test_path - - fuzz_config_file = - "${distributedinput_path}/test/fuzztest/dinputreleasesink_fuzzer" - - include_dirs = [ - "include", - "${distributedinput_path}/interfaces/inner_kits/include", - "${distributedinput_path}/interfaces/ipc/include", - "${distributedinput_path}/services/source/sourcemanager/include", - "${distributedinput_path}/services/sink/sinkmanager/include", - "${distributedinput_path}/frameworks/include", - "${distributedinput_path}/sinkhandler/include", - "${distributedinput_path}/inputdevicehandler/include", - "${service_common}/include", - "${common_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", - "${services_source_path}/inputinject/include", - "${utils_path}/include", - ] - - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - ] - - sources = [ "dinputreleasesink_fuzzer.cpp" ] - - deps = [ "${distributedinput_path}/sinkhandler:libdinput_sink_handler" ] - - external_deps = [ - "c_utils:utils", - "distributed_hardware_fwk:distributedhardwareutils", - "dsoftbus:softbus_client", - "eventhandler:libeventhandler", - "hilog:libhilog", - "ipc:ipc_core", - "json:nlohmann_json_static", - "libevdev:libevdev", - "safwk:system_ability_fwk", - ] - - defines = [ - "HI_LOG_ENABLE", - "DH_LOG_TAG=\"DinputReleaseSinkFuzzTest\"", - "LOG_DOMAIN=0xD004120", - ] -} - -############################################################################### -group("fuzztest") { - testonly = true - - deps = [ ":DinputReleaseSinkFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/dinputreleasesink_fuzzer/corpus/init b/test/fuzztest/dinputreleasesink_fuzzer/corpus/init deleted file mode 100644 index e4ceac1..0000000 --- a/test/fuzztest/dinputreleasesink_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.cpp b/test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.cpp deleted file mode 100644 index 233bf56..0000000 --- a/test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2023 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 "dinputreleasesink_fuzzer.h" - -#include -#include -#include -#include -#include - -#include - -#include "constants_dinput.h" -#include "distributed_input_handler.h" -#include "distributed_input_kit.h" -#include "distributed_input_sink_handler.h" -#include "i_distributed_sink_input.h" - -namespace OHOS { -namespace DistributedHardware { -void ReleaseSinkFuzzTest(const uint8_t *data, size_t size) -{ - (void)data; - (void)size; - DistributedInput::DistributedInputSinkHandler::GetInstance().ReleaseSink(); -} -} // namespace DistributedHardware -} // namespace OHOS - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - /* Run your code on data */ - OHOS::DistributedHardware::ReleaseSinkFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.h b/test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.h deleted file mode 100644 index da96037..0000000 --- a/test/fuzztest/dinputreleasesink_fuzzer/dinputreleasesink_fuzzer.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2023 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 DINPUT_RELEASE_SINK_FUZZER_H -#define DINPUT_RELEASE_SINK_FUZZER_H - -#define FUZZ_PROJECT_NAME "dinputsinkhandler_fuzzer" - -#endif // DINPUT_RELEASE_SINK_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/dinputreleasesink_fuzzer/project.xml b/test/fuzztest/dinputreleasesink_fuzzer/project.xml deleted file mode 100644 index 4fdbc40..0000000 --- a/test/fuzztest/dinputreleasesink_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - diff --git a/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn b/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn deleted file mode 100644 index b336826..0000000 --- a/test/fuzztest/dinputreleasesource_fuzzer/BUILD.gn +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) 2023-2024 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("../../../distributedinput.gni") - -##############################fuzztest########################################## -ohos_fuzztest("DinputReleaseSourceFuzzTest") { - module_out_path = fuzz_test_path - - fuzz_config_file = - "${distributedinput_path}/test/fuzztest/dinputreleasesource_fuzzer" - - include_dirs = [ - "${av_transport_path}/common/include", - "include", - "${distributedinput_path}/interfaces/inner_kits/include", - "${distributedinput_path}/interfaces/ipc/include", - "${distributedinput_path}/services/source/sourcemanager/include", - "${distributedinput_path}/services/sink/sinkmanager/include", - "${distributedinput_path}/frameworks/include", - "${distributedinput_path}/sourcehandler/include", - "${distributedinput_path}/inputdevicehandler/include", - "${distributedinput_path}/services/state/include", - "${service_common}/include", - "${common_path}/include", - "${fwk_interfaces_path}/include", - "${fwk_interfaces_path}/include/ipc", - "${services_source_path}/inputinject/include", - "${utils_path}/include", - ] - - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - ] - - sources = [ "dinputreleasesource_fuzzer.cpp" ] - - deps = [ "${distributedinput_path}/sourcehandler:libdinput_source_handler" ] - - external_deps = [ - "c_utils:utils", - "distributed_hardware_fwk:distributedhardwareutils", - "dsoftbus:softbus_client", - "eventhandler:libeventhandler", - "hilog:libhilog", - "ipc:ipc_core", - "json:nlohmann_json_static", - "libevdev:libevdev", - "safwk:system_ability_fwk", - ] - - defines = [ - "HI_LOG_ENABLE", - "DH_LOG_TAG=\"DinputReleaseSourceFuzzTest\"", - "LOG_DOMAIN=0xD004120", - ] -} - -############################################################################### -group("fuzztest") { - testonly = true - - deps = [ ":DinputReleaseSourceFuzzTest" ] -} -############################################################################### diff --git a/test/fuzztest/dinputreleasesource_fuzzer/corpus/init b/test/fuzztest/dinputreleasesource_fuzzer/corpus/init deleted file mode 100644 index e4ceac1..0000000 --- a/test/fuzztest/dinputreleasesource_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023 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/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.cpp b/test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.cpp deleted file mode 100644 index c78d456..0000000 --- a/test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2023 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 "dinputreleasesource_fuzzer.h" - -#include -#include -#include -#include -#include - -#include - -#include "constants_dinput.h" -#include "distributed_input_handler.h" -#include "distributed_input_kit.h" -#include "distributed_input_source_handler.h" -#include "i_distributed_source_input.h" - -namespace OHOS { -namespace DistributedHardware { -void ReleaseSourceFuzzTest(const uint8_t *data, size_t size) -{ - (void)data; - (void)size; - DistributedInput::DistributedInputSourceHandler::GetInstance().ReleaseSource(); -} -} // namespace DistributedHardware -} // namespace OHOS - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - /* Run your code on data */ - OHOS::DistributedHardware::ReleaseSourceFuzzTest(data, size); - return 0; -} \ No newline at end of file diff --git a/test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.h b/test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.h deleted file mode 100644 index 2309bf3..0000000 --- a/test/fuzztest/dinputreleasesource_fuzzer/dinputreleasesource_fuzzer.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2023 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 DINPUT_RELEASE_SOURCE_FUZZER_H -#define DINPUT_RELEASE_SOURCE_FUZZER_H - -#define FUZZ_PROJECT_NAME "dinputreleasesource_fuzzer" - -#endif // DINPUT_RELEASE_SOURCE_FUZZER_H \ No newline at end of file diff --git a/test/fuzztest/dinputreleasesource_fuzzer/project.xml b/test/fuzztest/dinputreleasesource_fuzzer/project.xml deleted file mode 100644 index 4fdbc40..0000000 --- a/test/fuzztest/dinputreleasesource_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - -- Gitee