Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
824cfd6e
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
大约 1 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
824cfd6e
编写于
12月 03, 2021
作者:
O
openharmony_ci
提交者:
Gitee
12月 03, 2021
浏览文件
操作
浏览文件
下载
差异文件
!179 add: fuzztest code
Merge pull request !179 from 熊磊/12011518
上级
232c5579
c7c7dc87
变更
40
显示空白变更内容
内联
并排
Showing
40 changed file
with
1690 addition
and
0 deletion
+1690
-0
test/fuzztest/BUILD.gn
test/fuzztest/BUILD.gn
+501
-0
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.cpp
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.cpp
+36
-0
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.h
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.h
+19
-0
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.cpp
.../fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.cpp
+36
-0
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.h
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.h
+19
-0
test/fuzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.cpp
...ztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.cpp
+36
-0
test/fuzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.h
...uzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.h
+19
-0
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp
+52
-0
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.h
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.h
+19
-0
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp
+69
-0
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.h
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.h
+19
-0
test/fuzztest/StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.cpp
...StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.cpp
+36
-0
test/fuzztest/StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.h
...t/StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.h
+19
-0
test/fuzztest/StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.cpp
...t/StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.cpp
+36
-0
test/fuzztest/StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.h
...est/StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.h
+19
-0
test/fuzztest/SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.cpp
...stemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.cpp
+35
-0
test/fuzztest/SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.h
...SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.h
+19
-0
test/fuzztest/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.cpp
...SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.cpp
+38
-0
test/fuzztest/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.h
...t/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.h
+19
-0
test/fuzztest/SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.cpp
...eterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.cpp
+37
-0
test/fuzztest/SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.h
...ameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.h
+19
-0
test/fuzztest/SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.cpp
...GetParameterName_fuzzer/SystemGetParameterName_fuzzer.cpp
+37
-0
test/fuzztest/SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.h
...emGetParameterName_fuzzer/SystemGetParameterName_fuzzer.h
+19
-0
test/fuzztest/SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.cpp
...tParameterValue_fuzzer/SystemGetParameterValue_fuzzer.cpp
+38
-0
test/fuzztest/SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.h
...GetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.h
+19
-0
test/fuzztest/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.cpp
...t/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.cpp
+40
-0
test/fuzztest/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.h
...est/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.h
+19
-0
test/fuzztest/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.cpp
...t/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.cpp
+36
-0
test/fuzztest/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.h
...est/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.h
+19
-0
test/fuzztest/SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp
...ersalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp
+70
-0
test/fuzztest/SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.h
...aversalParameter_fuzzer/SystemTraversalParameter_fuzzer.h
+25
-0
test/fuzztest/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.cpp
...SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.cpp
+36
-0
test/fuzztest/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.h
...t/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.h
+19
-0
test/fuzztest/SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.cpp
...stemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.cpp
+47
-0
test/fuzztest/SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.h
...SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.h
+19
-0
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp
.../fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp
+53
-0
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.h
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.h
+19
-0
test/fuzztest/project.xml
test/fuzztest/project.xml
+25
-0
test/fuzztest/utils/fuzz_utils.cpp
test/fuzztest/utils/fuzz_utils.cpp
+28
-0
test/fuzztest/utils/include/fuzz_utils.h
test/fuzztest/utils/include/fuzz_utils.h
+20
-0
未找到文件。
test/fuzztest/BUILD.gn
0 → 100644
浏览文件 @
824cfd6e
# Copyright (c) 2021 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.
module_output_path = "startup/fuzztest"
#####################hydra-fuzz###################
import("//build/config/features.gni")
import("//build/ohos.gni")
import("//build/test.gni")
ohos_static_library("libfuzz_utils") {
sources = [ "utils/fuzz_utils.cpp" ]
include_dirs = [ "//base/startup/init_lite/test/fuzztest/utils/include" ]
deps = []
part_name = "init"
}
##############################fuzztest##########################################
ohos_fuzztest("DoRebootFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
"//base/startup/init_lite/interfaces/innerkits/reboot:libreboot_static",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "DoReboot_fuzzer/DoReboot_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("GetControlFileFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
"//base/startup/init_lite/interfaces/innerkits/file:libfile",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "GetControlFile_fuzzer/GetControlFile_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("GetControlSocketFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket",
"//base/startup/init_lite/services/log:init_log",
"//third_party/bounds_checking_function:libsec_static",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "GetControlSocket_fuzzer/GetControlSocket_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("MountAllFstabFuzzTest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits/fs_manager:libfsmanager_static",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/utils:libinit_utils",
"//base/startup/init_lite/test/fuzztest:libfuzz_utils",
"//third_party/bounds_checking_function:libsec_static",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("ReadFileInDirFuzzTest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/services/init/include",
"//base/startup/init_lite/services/include",
]
deps = [
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("StartDynamicProcessFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
"//base/startup/init_lite/interfaces/innerkits/dynamic_service:dynamic_service",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("StopDynamicProcessFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
"//base/startup/init_lite/interfaces/innerkits/dynamic_service:dynamic_service",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemDumpParametersFuzzTest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//base/startup/init_lite/test/fuzztest:libfuzz_utils",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemFindParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterCommitIdFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [
"SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.cpp",
]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterNameFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources =
[ "SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterValueFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources =
[ "SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemSetParameterFuzztest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemTraversalParameterFuzztest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/services/init/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
"//third_party/bounds_checking_function/include",
]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//base/startup/init_lite/test/fuzztest:libfuzz_utils",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources =
[ "SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemWaitParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//third_party/bounds_checking_function:libsec_static",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemWatchParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/services/init/include",
]
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//base/startup/init_lite/services/param:param_client",
"//base/startup/init_lite/services/param:param_watcheragent",
"//third_party/bounds_checking_function:libsec_static",
"//utils/native/base:utils",
]
external_deps = [
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("UmountAllFstabFuzzTest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits/fs_manager:libfsmanager_static",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/utils:libinit_utils",
"//base/startup/init_lite/test/fuzztest:libfuzz_utils",
"//third_party/bounds_checking_function:libsec_static",
]
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
###############################################################################
group("fuzztest") {
testonly = true
deps = []
deps += [
# deps file
":DoRebootFuzzTest",
":GetControlFileFuzzTest",
":GetControlSocketFuzzTest",
":MountAllFstabFuzzTest",
":ReadFileInDirFuzzTest",
":StartDynamicProcessFuzzTest",
":StopDynamicProcessFuzzTest",
":SystemDumpParametersFuzzTest",
":SystemFindParameterFuzzTest",
":SystemGetParameterCommitIdFuzzTest",
":SystemGetParameterFuzzTest",
":SystemGetParameterNameFuzzTest",
":SystemGetParameterValueFuzzTest",
":SystemSetParameterFuzztest",
":SystemTraversalParameterFuzztest",
":SystemWaitParameterFuzzTest",
":SystemWatchParameterFuzzTest",
":UmountAllFstabFuzzTest",
]
}
###############################################################################
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "DoReboot_fuzzer.h"
#include "init_reboot.h"
namespace
OHOS
{
bool
FuzzDoReboot
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
DoReboot
(
reinterpret_cast
<
const
char
*>
(
data
)))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzDoReboot
(
data
,
size
);
return
0
;
}
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_DOREBOOT_FUZZER_H
#define TEST_FUZZTEST_DOREBOOT_FUZZER_H
#define FUZZ_PROJECT_NAME "DoReboot_fuzzer"
#endif
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "GetControlFile_fuzzer.h"
#include "init_file.h"
namespace
OHOS
{
bool
FuzzGetControlFile
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
GetControlFile
(
reinterpret_cast
<
const
char
*>
(
data
)))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzGetControlFile
(
data
,
size
);
return
0
;
}
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_GETCONTROLFILE_FUZZER_H
#define TEST_FUZZTEST_GETCONTROLFILE_FUZZER_H
#define FUZZ_PROJECT_NAME "GetControlFile_fuzzer"
#endif
test/fuzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "GetControlSocket_fuzzer.h"
#include "init_socket.h"
namespace
OHOS
{
bool
FuzzGetControlSocket
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
GetControlSocket
(
reinterpret_cast
<
const
char
*>
(
data
)))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzGetControlSocket
(
data
,
size
);
return
0
;
}
test/fuzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_GETCONTROLSOCKET_FUZZER_H
#define TEST_FUZZTEST_GETCONTROLSOCKET_FUZZER_H
#define FUZZ_PROJECT_NAME "GetControlSocket_fuzzer"
#endif
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "MountAllFstab_fuzzer.h"
#include <iostream>
#include "fs_manager/fs_manager.h"
#include "fuzz_utils.h"
namespace
OHOS
{
bool
FuzzMountAllWithFstabFile
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
FILE
*
pFile
=
nullptr
;
pFile
=
fopen
(
"fstab.test"
,
"w+"
);
if
(
pFile
==
nullptr
)
{
std
::
cout
<<
"[fuzz] open file fstab.test failed"
;
return
false
;
}
if
(
reinterpret_cast
<
int
>
(
fwrite
(
data
,
1
,
size
,
pFile
))
!=
size
)
{
std
::
cout
<<
"[fuzz] write data to fstab.test failed"
;
(
void
)
fclose
(
pFile
);
return
false
;
}
(
void
)
fclose
(
pFile
);
CloseStdout
();
if
(
!
MountAllWithFstabFile
(
"fstab.test"
,
false
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzMountAllWithFstabFile
(
data
,
size
);
return
0
;
}
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_MOUNTALLFSTAB_FUZZER_H
#define TEST_FUZZTEST_MOUNTALLFSTAB_FUZZER_H
#define FUZZ_PROJECT_NAME "MountAllFstab_fuzzer"
#endif
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "ReadFileInDir_fuzzer.h"
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "init.h"
#include "init_utils.h"
static
int
FakeParser
(
const
char
*
testFile
,
void
*
context
)
{
UNUSED
(
context
);
std
::
ifstream
fileStream
;
fileStream
.
open
(
testFile
);
std
::
vector
<
std
::
string
>
fileText
;
std
::
string
textLine
;
while
(
getline
(
fileStream
,
textLine
))
{
fileText
.
push_back
(
textLine
);
}
fileStream
.
close
();
std
::
vector
<
std
::
string
>
().
swap
(
fileText
);
return
0
;
}
namespace
OHOS
{
bool
FuzzReadFileInDir
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
FILE
*
pFile
=
nullptr
;
pFile
=
fopen
(
"ReadFileInDir.test"
,
"w+"
);
if
(
pFile
==
nullptr
)
{
std
::
cout
<<
"[fuzz] open file ReadFileInDir.test failed"
;
return
false
;
}
if
(
reinterpret_cast
<
int
>
(
fwrite
(
data
,
1
,
size
,
pFile
))
!=
size
)
{
std
::
cout
<<
"[fuzz] write data to ReadFileInDir.test failed"
;
(
void
)
fclose
(
pFile
);
return
false
;
}
(
void
)
fclose
(
pFile
);
if
(
!
ReadFileInDir
(
"/data"
,
".test"
,
FakeParser
,
NULL
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzReadFileInDir
(
data
,
size
);
return
0
;
}
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_READFILEINDIR_FUZZER_H
#define TEST_FUZZTEST_READFILEINDIR_FUZZER_H
#define FUZZ_PROJECT_NAME "ReadFileInDir_fuzzer"
#endif
test/fuzztest/StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "StartDynamicProcess_fuzzer.h"
#include "dynamic_service.h"
namespace
OHOS
{
bool
FuzzStartDynamicProcess
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
StartDynamicProcess
(
reinterpret_cast
<
const
char
*>
(
data
)))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzStartDynamicProcess
(
data
,
size
);
return
0
;
}
test/fuzztest/StartDynamicProcess_fuzzer/StartDynamicProcess_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_STARTDYNAMICPROCESS_FUZZER_H
#define TEST_FUZZTEST_STARTDYNAMICPROCESS_FUZZER_H
#define FUZZ_PROJECT_NAME "StartDynamicProcess_fuzzer"
#endif
test/fuzztest/StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "StopDynamicProcess_fuzzer.h"
#include "dynamic_service.h"
namespace
OHOS
{
bool
FuzzStopDynamicProcess
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
StopDynamicProcess
(
reinterpret_cast
<
const
char
*>
(
data
)))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzStopDynamicProcess
(
data
,
size
);
return
0
;
}
test/fuzztest/StopDynamicProcess_fuzzer/StopDynamicProcess_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_STOPDYNAMICPROCESS_FUZZER_H
#define TEST_FUZZTEST_STOPDYNAMICPROCESS_FUZZER_H
#define FUZZ_PROJECT_NAME "StopDynamicProcess_fuzzer"
#endif
test/fuzztest/SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemDumpParameters_fuzzer.h"
#include "sys_param.h"
#include "fuzz_utils.h"
namespace
OHOS
{
bool
FuzzSystemDumpParameters
(
const
uint8_t
*
data
,
size_t
size
)
{
CloseStdout
();
SystemDumpParameters
(
reinterpret_cast
<
int
>
(
data
));
return
true
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemDumpParameters
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMDUMPPARAMETERS_FUZZER_H
#define TEST_FUZZTEST_SYSTEMDUMPPARAMETERS_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemDumpParameters_fuzzer"
#endif
test/fuzztest/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemFindParameter_fuzzer.h"
#include "sys_param.h"
static
ParamHandle
handle
;
namespace
OHOS
{
bool
FuzzSystemFindParameter
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
SystemFindParameter
(
reinterpret_cast
<
const
char
*>
(
data
),
&
handle
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemFindParameter
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMFINDPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMFINDPARAMETER_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemFindParameter_fuzzer"
#endif
test/fuzztest/SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemGetParameterCommitId_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
bool
FuzzSystemGetParameterCommitId
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
uint32_t
commitId
=
0
;
if
(
!
SystemGetParameterCommitId
(
reinterpret_cast
<
ParamHandle
>
(
data
),
&
commitId
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemGetParameterCommitId
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMGETPARAMETERCOMMITID_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETERCOMMITID_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemGetParameterCommitId_fuzzer"
#endif
test/fuzztest/SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemGetParameterName_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
bool
FuzzSystemGetParameterName
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
char
buffer
[
PARAM_NAME_LEN_MAX
]
=
{
0
};
if
(
!
SystemGetParameterName
(
reinterpret_cast
<
ParamHandle
>
(
data
),
buffer
,
PARAM_NAME_LEN_MAX
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemGetParameterName
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMGETPARAMETERNAME_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETERNAME_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemGetParameterName_fuzzer"
#endif
test/fuzztest/SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemGetParameterValue_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
bool
FuzzSystemGetParameterValue
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
char
buffer
[
PARAM_CONST_VALUE_LEN_MAX
]
=
{
0
};
uint32_t
len
=
PARAM_CONST_VALUE_LEN_MAX
;
if
(
!
SystemGetParameterValue
(
reinterpret_cast
<
ParamHandle
>
(
data
),
buffer
,
&
len
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemGetParameterValue
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMGETPARAMETERVALUE_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETERVALUE_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemGetParameterValue_fuzzer"
#endif
test/fuzztest/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemGetParameter_fuzzer.h"
#include <iostream>
#include "sys_param.h"
namespace
OHOS
{
bool
FuzzSystemGetParameter
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
char
buffer
[
PARAM_CONST_VALUE_LEN_MAX
]
=
{
0
};
uint32_t
len
=
PARAM_CONST_VALUE_LEN_MAX
;
if
(
!
SystemGetParameter
(
reinterpret_cast
<
const
char
*>
(
data
),
buffer
,
&
len
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemGetParameter
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMGETPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETER_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemGetParameter_fuzzer"
#endif
test/fuzztest/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemSetParameter_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
bool
FuzzSystemSetParameter
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
SystemSetParameter
(
reinterpret_cast
<
const
char
*>
(
data
),
reinterpret_cast
<
const
char
*>
(
data
)))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemSetParameter
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMSETPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMSETPARAMETER_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemSetParameter_fuzzer"
#endif
test/fuzztest/SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemTraversalParameter_fuzzer.h"
#include "fuzz_utils.h"
#include "init.h"
#include "securec.h"
#include "sys_param.h"
static
void
FakeShowParam
(
ParamHandle
handle
,
void
*
cookie
)
{
Cookie
*
nameAndValue
=
reinterpret_cast
<
Cookie
*>
(
cookie
);
char
*
name
=
nameAndValue
->
data
;
unsigned
int
nameLen
=
nameAndValue
->
size
;
char
value
[
PARAM_CONST_VALUE_LEN_MAX
]
=
{
0
};
SystemGetParameterName
(
handle
,
name
,
nameLen
);
uint32_t
size
=
PARAM_CONST_VALUE_LEN_MAX
;
SystemGetParameterValue
(
handle
,
value
,
&
size
);
printf
(
"
\t
%s = %s
\n
"
,
name
,
value
);
}
namespace
OHOS
{
bool
FuzzSystemTraversalParameter
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
CloseStdout
();
Cookie
instance
=
{
0
,
nullptr
};
Cookie
*
cookie
=
&
instance
;
if
(
size
<=
0
)
{
return
false
;
}
cookie
->
data
=
static_cast
<
char
*>
(
malloc
(
size
));
if
(
cookie
->
data
==
nullptr
)
{
return
true
;
}
cookie
->
size
=
size
;
int
ret
=
memcpy_s
(
cookie
->
data
,
size
,
data
,
size
);
if
(
ret
!=
EOK
)
{
return
false
;
}
if
(
!
SystemTraversalParameter
(
FakeShowParam
,
reinterpret_cast
<
void
*>
(
cookie
)))
{
result
=
true
;
}
free
(
cookie
->
data
);
cookie
->
data
=
nullptr
;
cookie
->
size
=
0
;
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemTraversalParameter
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMTRAVERSALPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMTRAVERSALPARAMETER_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemTraversalParameter_fuzzer"
typedef
struct
{
size_t
size
;
char
*
data
;
}
Cookie
;
#endif
test/fuzztest/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemWaitParameter_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
bool
FuzzSystemWaitParameter
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
SystemWaitParameter
(
reinterpret_cast
<
const
char
*>
(
data
),
reinterpret_cast
<
const
char
*>
(
data
),
1
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemWaitParameter
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMWAITPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMWAITPARAMETER_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemWaitParameter_fuzzer"
#endif
test/fuzztest/SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "SystemWatchParameter_fuzzer.h"
#include "init.h"
#include "sys_param.h"
static
void
HandleParamChange
(
const
char
*
key
,
const
char
*
value
,
void
*
context
)
{
if
(
key
==
nullptr
||
value
==
nullptr
)
{
return
;
}
UNUSED
(
context
);
printf
(
"Receive parameter change %s %s
\n
"
,
key
,
value
);
}
namespace
OHOS
{
bool
FuzzSystemWatchParameter
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
SystemWatchParameter
(
reinterpret_cast
<
const
char
*>
(
data
),
HandleParamChange
,
NULL
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzSystemWatchParameter
(
data
,
size
);
return
0
;
}
test/fuzztest/SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_SYSTEMWATCHPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMWATCHPARAMETER_FUZZER_H
#define FUZZ_PROJECT_NAME "SystemWatchParameter_fuzzer"
#endif
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 "UmountAllFstab_fuzzer.h"
#include <iostream>
#include "fs_manager/fs_manager.h"
#include "fuzz_utils.h"
namespace
OHOS
{
bool
FuzzUmountAllWithFstabFile
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
FILE
*
pFile
=
nullptr
;
pFile
=
fopen
(
"fstab.test"
,
"w+"
);
if
(
pFile
==
nullptr
)
{
std
::
cout
<<
"[fuzz] open file fstab.test failed"
;
return
false
;
}
if
(
reinterpret_cast
<
int
>
(
fwrite
(
data
,
1
,
size
,
pFile
))
!=
size
)
{
std
::
cout
<<
"[fuzz] write data to fstab.test failed"
;
(
void
)
fclose
(
pFile
);
return
false
;
}
(
void
)
fclose
(
pFile
);
CloseStdout
();
if
(
!
UmountAllWithFstabFile
(
"fstab.test"
))
{
result
=
true
;
}
return
result
;
}
}
/* Fuzzer entry point */
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
/* Run your code on data */
OHOS
::
FuzzUmountAllWithFstabFile
(
data
,
size
);
return
0
;
}
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 TEST_FUZZTEST_UMOUNTALLFSTAB_FUZZER_H
#define TEST_FUZZTEST_UMOUNTALLFSTAB_FUZZER_H
#define FUZZ_PROJECT_NAME "UmountAllFstab_fuzzer"
#endif
test/fuzztest/project.xml
0 → 100644
浏览文件 @
824cfd6e
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2021 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>
100
</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>
2048
</rss_limit_mb>
</fuzztest>
</fuzz_config>
test/fuzztest/utils/fuzz_utils.cpp
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 <fcntl.h>
#include <unistd.h>
#include "fuzz_utils.h"
void
CloseStdout
(
void
)
{
int
fd
=
open
(
"/dev/null"
,
O_RDWR
|
O_CLOEXEC
);
if
(
fd
<
0
)
{
return
;
}
dup2
(
fd
,
1
);
close
(
fd
);
}
test/fuzztest/utils/include/fuzz_utils.h
0 → 100644
浏览文件 @
824cfd6e
/*
* Copyright (c) 2021 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 FUZZ_UTILS_H
#define FUZZ_UTILS_H
void
CloseStdout
(
void
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录