fix:delete redundant FUZZ

Signed-off-by: hanlin15 <lihanlin15@huawei.com>
Change-Id: I191e190bd7d4568751db272ba261f5b32dbf11a0
This commit is contained in:
hanlin15 2024-11-21 19:41:45 +08:00
parent 61a075eef2
commit bdf796dffb
6 changed files with 0 additions and 167 deletions

View File

@ -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",

View File

@ -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",
]
}
###############################################################################

View File

@ -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

View File

@ -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 <cstddef>
#include <cstdint>
#include <cstring>
#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;
}

View File

@ -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 <cstdint>
#include <unistd.h>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <fcntl.h>
#define FUZZ_PROJECT_NAME "gettokenidsize_fuzzer"
#endif

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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_config>
<fuzztest>
<!-- maximum length of a test input -->
<max_len>1000</max_len>
<!-- maximum total time in seconds to run the fuzzer -->
<max_total_time>300</max_total_time>
<!-- memory usage limit in Mb -->
<rss_limit_mb>4096</rss_limit_mb>
</fuzztest>
</fuzz_config>