From bdf796dffb70a4783f8f2771248efb32e0493d6f Mon Sep 17 00:00:00 2001 From: hanlin15 Date: Thu, 21 Nov 2024 19:41:45 +0800 Subject: [PATCH] fix:delete redundant FUZZ Signed-off-by: hanlin15 Change-Id: I191e190bd7d4568751db272ba261f5b32dbf11a0 --- ipc/native/test/fuzztest/BUILD.gn | 1 - .../fuzztest/c/gettokenidsize_fuzzer/BUILD.gn | 58 ------------------- .../c/gettokenidsize_fuzzer/corpus/init | 16 ----- .../gettokenidsize_fuzzer.cpp | 40 ------------- .../gettokenidsize_fuzzer.h | 27 --------- .../c/gettokenidsize_fuzzer/project.xml | 25 -------- 6 files changed, 167 deletions(-) delete mode 100644 ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/BUILD.gn delete mode 100644 ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/corpus/init delete mode 100644 ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.cpp delete mode 100644 ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.h delete mode 100644 ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/project.xml diff --git a/ipc/native/test/fuzztest/BUILD.gn b/ipc/native/test/fuzztest/BUILD.gn index b9312c54..eda44244 100644 --- a/ipc/native/test/fuzztest/BUILD.gn +++ b/ipc/native/test/fuzztest/BUILD.gn @@ -17,7 +17,6 @@ group("fuzztest") { "c/getfeaturesize_fuzzer:fuzztest", "c/getrpcfeatureack_fuzzer:fuzztest", "c/gettokenfromdata_fuzzer:fuzztest", - "c/gettokenidsize_fuzzer:fuzztest", "c/isatenable_fuzzer:fuzztest", "c/isfeatureack_fuzzer:fuzztest", "c/setfeaturetransdata_fuzzer:fuzztest", diff --git a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/BUILD.gn b/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/BUILD.gn deleted file mode 100644 index b36f3f40..00000000 --- a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/BUILD.gn +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2022 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") -SUBSYSTEM_DIR = "//foundation/communication/ipc" -IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native" - -##############################fuzztest########################################## -ohos_fuzztest("GetTokenIdSizeFuzzTest") { - module_out_path = "ipc/ipc" - fuzz_config_file = "$IPC_CORE_ROOT/test/fuzztest/c/gettokenidsize_fuzzer" - include_dirs = [ "$IPC_CORE_ROOT/c/rpc/include" ] - cflags = [ - "-g", - "-O0", - "-Wno-unused-variable", - "-fno-omit-frame-pointer", - "-fstack-protector-strong", - ] - - sources = [ "gettokenidsize_fuzzer.cpp" ] - - deps = [ - "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core", - "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_single:ipc_single", - "$SUBSYSTEM_DIR/interfaces/innerkits/libdbinder:libdbinder", - ] - - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - ] -} - -############################################################################### -group("fuzztest") { - testonly = true - deps = [] - deps += [ - # deps file - # ":GetTokenIdSizeFuzzTest", - ] -} - -############################################################################### - diff --git a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/corpus/init b/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/corpus/init deleted file mode 100644 index 8eb5a7d6..00000000 --- a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/corpus/init +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2022 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/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.cpp b/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.cpp deleted file mode 100644 index 8f69c129..00000000 --- a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2022 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 "gettokenidsize_fuzzer.h" - -#include -#include -#include -#include "rpc_feature_set.h" - -namespace OHOS { - void DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size) - { - if (data == nullptr || size == 0) { - return; - } - GetTokenIdSize(); - } -} - -/* Fuzzer entry point */ -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - /* Run your code on data */ - OHOS::DoSomethingInterestingWithMyAPI(data, size); - return 0; -} - diff --git a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.h b/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.h deleted file mode 100644 index c6fbb142..00000000 --- a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/gettokenidsize_fuzzer.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2022 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 GETTOKENIDSIZE_FUZZER_H -#define GETTOKENIDSIZE_FUZZER_H - -#include -#include -#include -#include -#include -#include - -#define FUZZ_PROJECT_NAME "gettokenidsize_fuzzer" - -#endif \ No newline at end of file diff --git a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/project.xml b/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/project.xml deleted file mode 100644 index 6e8ad2cf..00000000 --- a/ipc/native/test/fuzztest/c/gettokenidsize_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - -