Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
76dc5f3c
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
接近 2 年 前同步成功
通知
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看板
未验证
提交
76dc5f3c
编写于
3月 10, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 10, 2022
浏览文件
操作
浏览文件
下载
差异文件
!405 fix: fuzztest code build problem
Merge pull request !405 from 熊磊/fuzzrelease
上级
1c4aa380
9257eaa0
变更
38
隐藏空白更改
内联
并排
Showing
38 changed file
with
157 addition
and
96 deletion
+157
-96
test/fuzztest/BUILD.gn
test/fuzztest/BUILD.gn
+113
-72
test/fuzztest/test_startup_DoReboot_fuzzer/test_startup_DoReboot_fuzzer.cpp
..._startup_DoReboot_fuzzer/test_startup_DoReboot_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_DoReboot_fuzzer/test_startup_DoReboot_fuzzer.h
...st_startup_DoReboot_fuzzer/test_startup_DoReboot_fuzzer.h
+1
-0
test/fuzztest/test_startup_GetControlFile_fuzzer/test_startup_GetControlFile_fuzzer.cpp
...ControlFile_fuzzer/test_startup_GetControlFile_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_GetControlFile_fuzzer/test_startup_GetControlFile_fuzzer.h
...etControlFile_fuzzer/test_startup_GetControlFile_fuzzer.h
+1
-0
test/fuzztest/test_startup_GetControlSocket_fuzzer/test_startup_GetControlSocket_fuzzer.cpp
...rolSocket_fuzzer/test_startup_GetControlSocket_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_GetControlSocket_fuzzer/test_startup_GetControlSocket_fuzzer.h
...ntrolSocket_fuzzer/test_startup_GetControlSocket_fuzzer.h
+1
-0
test/fuzztest/test_startup_MountAllFstab_fuzzer/test_startup_MountAllFstab_fuzzer.cpp
...ountAllFstab_fuzzer/test_startup_MountAllFstab_fuzzer.cpp
+2
-2
test/fuzztest/test_startup_MountAllFstab_fuzzer/test_startup_MountAllFstab_fuzzer.h
..._MountAllFstab_fuzzer/test_startup_MountAllFstab_fuzzer.h
+1
-0
test/fuzztest/test_startup_ReadFileInDir_fuzzer/test_startup_ReadFileInDir_fuzzer.cpp
...eadFileInDir_fuzzer/test_startup_ReadFileInDir_fuzzer.cpp
+2
-2
test/fuzztest/test_startup_ReadFileInDir_fuzzer/test_startup_ReadFileInDir_fuzzer.h
..._ReadFileInDir_fuzzer/test_startup_ReadFileInDir_fuzzer.h
+1
-0
test/fuzztest/test_startup_ServiceControlStart_fuzzer/test_startup_ServiceControlStart_fuzzer.cpp
...lStart_fuzzer/test_startup_ServiceControlStart_fuzzer.cpp
+2
-2
test/fuzztest/test_startup_ServiceControlStart_fuzzer/test_startup_ServiceControlStart_fuzzer.h
...rolStart_fuzzer/test_startup_ServiceControlStart_fuzzer.h
+1
-0
test/fuzztest/test_startup_ServiceControlStop_fuzzer/test_startup_ServiceControlStop_fuzzer.cpp
...rolStop_fuzzer/test_startup_ServiceControlStop_fuzzer.cpp
+2
-2
test/fuzztest/test_startup_ServiceControlStop_fuzzer/test_startup_ServiceControlStop_fuzzer.h
...ntrolStop_fuzzer/test_startup_ServiceControlStop_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemDumpParameters_fuzzer/test_startup_SystemDumpParameters_fuzzer.cpp
...eters_fuzzer/test_startup_SystemDumpParameters_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemDumpParameters_fuzzer/test_startup_SystemDumpParameters_fuzzer.h
...ameters_fuzzer/test_startup_SystemDumpParameters_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemFindParameter_fuzzer/test_startup_SystemFindParameter_fuzzer.cpp
...ameter_fuzzer/test_startup_SystemFindParameter_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemFindParameter_fuzzer/test_startup_SystemFindParameter_fuzzer.h
...arameter_fuzzer/test_startup_SystemFindParameter_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemGetParameterCommitId_fuzzer/test_startup_SystemGetParameterCommitId_fuzzer.cpp
...fuzzer/test_startup_SystemGetParameterCommitId_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemGetParameterCommitId_fuzzer/test_startup_SystemGetParameterCommitId_fuzzer.h
...d_fuzzer/test_startup_SystemGetParameterCommitId_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemGetParameterName_fuzzer/test_startup_SystemGetParameterName_fuzzer.cpp
...ame_fuzzer/test_startup_SystemGetParameterName_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemGetParameterName_fuzzer/test_startup_SystemGetParameterName_fuzzer.h
...rName_fuzzer/test_startup_SystemGetParameterName_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemGetParameterValue_fuzzer/test_startup_SystemGetParameterValue_fuzzer.cpp
...ue_fuzzer/test_startup_SystemGetParameterValue_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemGetParameterValue_fuzzer/test_startup_SystemGetParameterValue_fuzzer.h
...alue_fuzzer/test_startup_SystemGetParameterValue_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemGetParameter_fuzzer/test_startup_SystemGetParameter_fuzzer.cpp
...rameter_fuzzer/test_startup_SystemGetParameter_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemGetParameter_fuzzer/test_startup_SystemGetParameter_fuzzer.h
...Parameter_fuzzer/test_startup_SystemGetParameter_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemSetParameter_fuzzer/test_startup_SystemSetParameter_fuzzer.cpp
...rameter_fuzzer/test_startup_SystemSetParameter_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemSetParameter_fuzzer/test_startup_SystemSetParameter_fuzzer.h
...Parameter_fuzzer/test_startup_SystemSetParameter_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemTraversalParameter_fuzzer/test_startup_SystemTraversalParameter_fuzzer.cpp
...r_fuzzer/test_startup_SystemTraversalParameter_fuzzer.cpp
+2
-2
test/fuzztest/test_startup_SystemTraversalParameter_fuzzer/test_startup_SystemTraversalParameter_fuzzer.h
...ter_fuzzer/test_startup_SystemTraversalParameter_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemWaitParameter_fuzzer/test_startup_SystemWaitParameter_fuzzer.cpp
...ameter_fuzzer/test_startup_SystemWaitParameter_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemWaitParameter_fuzzer/test_startup_SystemWaitParameter_fuzzer.h
...arameter_fuzzer/test_startup_SystemWaitParameter_fuzzer.h
+1
-0
test/fuzztest/test_startup_SystemWatchParameter_fuzzer/test_startup_SystemWatchParameter_fuzzer.cpp
...meter_fuzzer/test_startup_SystemWatchParameter_fuzzer.cpp
+1
-1
test/fuzztest/test_startup_SystemWatchParameter_fuzzer/test_startup_SystemWatchParameter_fuzzer.h
...rameter_fuzzer/test_startup_SystemWatchParameter_fuzzer.h
+1
-0
test/fuzztest/test_startup_UmountAllFstab_fuzzer/test_startup_UmountAllFstab_fuzzer.cpp
...untAllFstab_fuzzer/test_startup_UmountAllFstab_fuzzer.cpp
+2
-2
test/fuzztest/test_startup_UmountAllFstab_fuzzer/test_startup_UmountAllFstab_fuzzer.h
...mountAllFstab_fuzzer/test_startup_UmountAllFstab_fuzzer.h
+1
-0
test/fuzztest/utils/include/fuzz_utils.h
test/fuzztest/utils/include/fuzz_utils.h
+2
-0
未找到文件。
test/fuzztest/BUILD.gn
浏览文件 @
76dc5f3c
...
...
@@ -27,10 +27,13 @@ ohos_static_library("libfuzz_utils") {
}
##############################fuzztest##########################################
ohos_fuzztest("DoRebootFuzzTest") {
ohos_fuzztest("
test_startup_
DoRebootFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
...
...
@@ -45,15 +48,18 @@ ohos_fuzztest("DoRebootFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
DoReboot_fuzzer/
DoReboot_fuzzer.cpp" ]
sources = [ "
test_startup_DoReboot_fuzzer/test_startup_
DoReboot_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("GetControlFileFuzzTest") {
ohos_fuzztest("
test_startup_
GetControlFileFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
...
...
@@ -68,15 +74,20 @@ ohos_fuzztest("GetControlFileFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "GetControlFile_fuzzer/GetControlFile_fuzzer.cpp" ]
sources = [
"test_startup_GetControlFile_fuzzer/test_startup_GetControlFile_fuzzer.cpp",
]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("GetControlSocketFuzzTest") {
ohos_fuzztest("
test_startup_
GetControlSocketFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
...
...
@@ -90,12 +101,12 @@ ohos_fuzztest("GetControlSocketFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
GetControlSocket_fuzzer/
GetControlSocket_fuzzer.cpp" ]
sources = [ "
test_startup_GetControlSocket_fuzzer/test_startup_
GetControlSocket_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("MountAllFstabFuzzTest") {
ohos_fuzztest("
test_startup_
MountAllFstabFuzzTest") {
module_out_path = module_output_path
include_dirs = [
...
...
@@ -117,17 +128,20 @@ ohos_fuzztest("MountAllFstabFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp" ]
sources = [
"test_startup_MountAllFstab_fuzzer/test_startup_MountAllFstab_fuzzer.cpp",
]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("ReadFileInDirFuzzTest") {
ohos_fuzztest("
test_startup_
ReadFileInDirFuzzTest") {
module_out_path = module_output_path
include_dirs = [
"//base/startup/init_lite/services/init/include",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
...
...
@@ -142,15 +156,20 @@ ohos_fuzztest("ReadFileInDirFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp" ]
sources = [
"test_startup_ReadFileInDir_fuzzer/test_startup_ReadFileInDir_fuzzer.cpp",
]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("ServiceControlStartFuzzTest") {
ohos_fuzztest("
test_startup_
ServiceControlStartFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//base/startup/init_lite/services/param:param_client",
...
...
@@ -163,15 +182,18 @@ ohos_fuzztest("ServiceControlStartFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
ServiceControlStart_fuzzer/
ServiceControlStart_fuzzer.cpp" ]
sources = [ "
test_startup_ServiceControlStart_fuzzer/test_startup_
ServiceControlStart_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("ServiceControlStopFuzzTest") {
ohos_fuzztest("
test_startup_
ServiceControlStopFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//base/startup/init_lite/services/param:param_client",
...
...
@@ -184,12 +206,12 @@ ohos_fuzztest("ServiceControlStopFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
ServiceControlStop_fuzzer/
ServiceControlStop_fuzzer.cpp" ]
sources = [ "
test_startup_ServiceControlStop_fuzzer/test_startup_
ServiceControlStop_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemDumpParametersFuzzTest") {
ohos_fuzztest("
test_startup_
SystemDumpParametersFuzzTest") {
module_out_path = module_output_path
include_dirs = [
...
...
@@ -211,15 +233,18 @@ ohos_fuzztest("SystemDumpParametersFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
SystemDumpParameters_fuzzer/
SystemDumpParameters_fuzzer.cpp" ]
sources = [ "
test_startup_SystemDumpParameters_fuzzer/test_startup_
SystemDumpParameters_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemFindParameterFuzzTest") {
ohos_fuzztest("
test_startup_
SystemFindParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -234,15 +259,18 @@ ohos_fuzztest("SystemFindParameterFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
SystemFindParameter_fuzzer/
SystemFindParameter_fuzzer.cpp" ]
sources = [ "
test_startup_SystemFindParameter_fuzzer/test_startup_
SystemFindParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterFuzzTest") {
ohos_fuzztest("
test_startup_
SystemGetParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -257,15 +285,18 @@ ohos_fuzztest("SystemGetParameterFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
SystemGetParameter_fuzzer/
SystemGetParameter_fuzzer.cpp" ]
sources = [ "
test_startup_SystemGetParameter_fuzzer/test_startup_
SystemGetParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterCommitIdFuzzTest") {
ohos_fuzztest("
test_startup_
SystemGetParameterCommitIdFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -280,17 +311,18 @@ ohos_fuzztest("SystemGetParameterCommitIdFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [
"SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.cpp",
]
sources = [ "test_startup_SystemGetParameterCommitId_fuzzer/test_startup_SystemGetParameterCommitId_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterNameFuzzTest") {
ohos_fuzztest("
test_startup_
SystemGetParameterNameFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -305,16 +337,18 @@ ohos_fuzztest("SystemGetParameterNameFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources =
[ "SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.cpp" ]
sources = [ "test_startup_SystemGetParameterName_fuzzer/test_startup_SystemGetParameterName_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemGetParameterValueFuzzTest") {
ohos_fuzztest("
test_startup_
SystemGetParameterValueFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -329,16 +363,18 @@ ohos_fuzztest("SystemGetParameterValueFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources =
[ "SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.cpp" ]
sources = [ "test_startup_SystemGetParameterValue_fuzzer/test_startup_SystemGetParameterValue_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemSetParameterFuzztest") {
ohos_fuzztest("
test_startup_
SystemSetParameterFuzztest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -353,12 +389,12 @@ ohos_fuzztest("SystemSetParameterFuzztest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
SystemSetParameter_fuzzer/
SystemSetParameter_fuzzer.cpp" ]
sources = [ "
test_startup_SystemSetParameter_fuzzer/test_startup_
SystemSetParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemTraversalParameterFuzztest") {
ohos_fuzztest("
test_startup_
SystemTraversalParameterFuzztest") {
module_out_path = module_output_path
include_dirs = [
...
...
@@ -382,16 +418,18 @@ ohos_fuzztest("SystemTraversalParameterFuzztest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources =
[ "SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp" ]
sources = [ "test_startup_SystemTraversalParameter_fuzzer/test_startup_SystemTraversalParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemWaitParameterFuzzTest") {
ohos_fuzztest("
test_startup_
SystemWaitParameterFuzzTest") {
module_out_path = module_output_path
include_dirs = [ "//base/startup/init_lite/services/include/param" ]
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",
...
...
@@ -406,17 +444,18 @@ ohos_fuzztest("SystemWaitParameterFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
SystemWaitParameter_fuzzer/
SystemWaitParameter_fuzzer.cpp" ]
sources = [ "
test_startup_SystemWaitParameter_fuzzer/test_startup_
SystemWaitParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("SystemWatchParameterFuzzTest") {
ohos_fuzztest("
test_startup_
SystemWatchParameterFuzzTest") {
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",
]
deps = [
...
...
@@ -440,12 +479,12 @@ ohos_fuzztest("SystemWatchParameterFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "
SystemWatchParameter_fuzzer/
SystemWatchParameter_fuzzer.cpp" ]
sources = [ "
test_startup_SystemWatchParameter_fuzzer/test_startup_
SystemWatchParameter_fuzzer.cpp" ]
defines = [ "STARTUP_INIT_TEST" ]
}
ohos_fuzztest("UmountAllFstabFuzzTest") {
ohos_fuzztest("
test_startup_
UmountAllFstabFuzzTest") {
module_out_path = module_output_path
include_dirs = [
...
...
@@ -454,7 +493,7 @@ ohos_fuzztest("UmountAllFstabFuzzTest") {
]
deps = [
"//base/startup/init_lite/interfaces/innerkits
/fs_manager
:libfsmanager_static",
"//base/startup/init_lite/interfaces/innerkits: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",
...
...
@@ -467,7 +506,9 @@ ohos_fuzztest("UmountAllFstabFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [ "UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp" ]
sources = [
"test_startup_UmountAllFstab_fuzzer/test_startup_UmountAllFstab_fuzzer.cpp",
]
defines = [ "STARTUP_INIT_TEST" ]
}
...
...
@@ -478,24 +519,24 @@ group("fuzztest") {
deps = []
deps += [
# deps file
":DoRebootFuzzTest",
":GetControlFileFuzzTest",
":GetControlSocketFuzzTest",
":MountAllFstabFuzzTest",
":ReadFileInDirFuzzTest",
":
StartDynamicProcess
FuzzTest",
":
StopDynamicProcess
FuzzTest",
":SystemDumpParametersFuzzTest",
":SystemFindParameterFuzzTest",
":SystemGetParameterCommitIdFuzzTest",
":SystemGetParameterFuzzTest",
":SystemGetParameterNameFuzzTest",
":SystemGetParameterValueFuzzTest",
":SystemSetParameterFuzztest",
":SystemTraversalParameterFuzztest",
":SystemWaitParameterFuzzTest",
":SystemWatchParameterFuzzTest",
":UmountAllFstabFuzzTest",
":
test_startup_
DoRebootFuzzTest",
":
test_startup_
GetControlFileFuzzTest",
":
test_startup_
GetControlSocketFuzzTest",
":
test_startup_
MountAllFstabFuzzTest",
":
test_startup_
ReadFileInDirFuzzTest",
":
test_startup_ServiceControlStart
FuzzTest",
":
test_startup_ServiceControlStop
FuzzTest",
":
test_startup_
SystemDumpParametersFuzzTest",
":
test_startup_
SystemFindParameterFuzzTest",
":
test_startup_
SystemGetParameterCommitIdFuzzTest",
":
test_startup_
SystemGetParameterFuzzTest",
":
test_startup_
SystemGetParameterNameFuzzTest",
":
test_startup_
SystemGetParameterValueFuzzTest",
":
test_startup_
SystemSetParameterFuzztest",
":
test_startup_
SystemTraversalParameterFuzztest",
":
test_startup_
SystemWaitParameterFuzzTest",
":
test_startup_
SystemWatchParameterFuzzTest",
":
test_startup_
UmountAllFstabFuzzTest",
]
}
###############################################################################
test/fuzztest/
DoReboot_fuzzer/
DoReboot_fuzzer.cpp
→
test/fuzztest/
test_startup_DoReboot_fuzzer/test_startup_
DoReboot_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "DoReboot_fuzzer.h"
#include "
test_startup_
DoReboot_fuzzer.h"
#include "init_reboot.h"
namespace
OHOS
{
...
...
test/fuzztest/
DoReboot_fuzzer/
DoReboot_fuzzer.h
→
test/fuzztest/
test_startup_DoReboot_fuzzer/test_startup_
DoReboot_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_DOREBOOT_FUZZER_H
#define TEST_FUZZTEST_DOREBOOT_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "DoReboot_fuzzer"
#endif
test/fuzztest/
GetControlFile_fuzzer/
GetControlFile_fuzzer.cpp
→
test/fuzztest/
test_startup_GetControlFile_fuzzer/test_startup_
GetControlFile_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "GetControlFile_fuzzer.h"
#include "
test_startup_
GetControlFile_fuzzer.h"
#include "init_file.h"
namespace
OHOS
{
...
...
test/fuzztest/
GetControlFile_fuzzer/
GetControlFile_fuzzer.h
→
test/fuzztest/
test_startup_GetControlFile_fuzzer/test_startup_
GetControlFile_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_GETCONTROLFILE_FUZZER_H
#define TEST_FUZZTEST_GETCONTROLFILE_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "GetControlFile_fuzzer"
#endif
test/fuzztest/
GetControlSocket_fuzzer/
GetControlSocket_fuzzer.cpp
→
test/fuzztest/
test_startup_GetControlSocket_fuzzer/test_startup_
GetControlSocket_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "GetControlSocket_fuzzer.h"
#include "
test_startup_
GetControlSocket_fuzzer.h"
#include "init_socket.h"
namespace
OHOS
{
...
...
test/fuzztest/
GetControlSocket_fuzzer/
GetControlSocket_fuzzer.h
→
test/fuzztest/
test_startup_GetControlSocket_fuzzer/test_startup_
GetControlSocket_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_GETCONTROLSOCKET_FUZZER_H
#define TEST_FUZZTEST_GETCONTROLSOCKET_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "GetControlSocket_fuzzer"
#endif
test/fuzztest/
MountAllFstab_fuzzer/
MountAllFstab_fuzzer.cpp
→
test/fuzztest/
test_startup_MountAllFstab_fuzzer/test_startup_
MountAllFstab_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "MountAllFstab_fuzzer.h"
#include "
test_startup_
MountAllFstab_fuzzer.h"
#include <iostream>
#include "fs_manager/fs_manager.h"
...
...
@@ -29,7 +29,7 @@ namespace OHOS {
std
::
cout
<<
"[fuzz] open file fstab.test failed"
;
return
false
;
}
if
(
reinterpret_cast
<
int
>
(
fwrite
(
data
,
1
,
size
,
pFile
)
)
!=
size
)
{
if
(
fwrite
(
data
,
1
,
size
,
pFile
)
!=
size
)
{
std
::
cout
<<
"[fuzz] write data to fstab.test failed"
;
(
void
)
fclose
(
pFile
);
return
false
;
...
...
test/fuzztest/
MountAllFstab_fuzzer/
MountAllFstab_fuzzer.h
→
test/fuzztest/
test_startup_MountAllFstab_fuzzer/test_startup_
MountAllFstab_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_MOUNTALLFSTAB_FUZZER_H
#define TEST_FUZZTEST_MOUNTALLFSTAB_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "MountAllFstab_fuzzer"
#endif
test/fuzztest/
ReadFileInDir_fuzzer/
ReadFileInDir_fuzzer.cpp
→
test/fuzztest/
test_startup_ReadFileInDir_fuzzer/test_startup_
ReadFileInDir_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "ReadFileInDir_fuzzer.h"
#include "
test_startup_
ReadFileInDir_fuzzer.h"
#include <fstream>
#include <iostream>
...
...
@@ -47,7 +47,7 @@ namespace OHOS {
std
::
cout
<<
"[fuzz] open file ReadFileInDir.test failed"
;
return
false
;
}
if
(
reinterpret_cast
<
int
>
(
fwrite
(
data
,
1
,
size
,
pFile
)
)
!=
size
)
{
if
(
fwrite
(
data
,
1
,
size
,
pFile
)
!=
size
)
{
std
::
cout
<<
"[fuzz] write data to ReadFileInDir.test failed"
;
(
void
)
fclose
(
pFile
);
return
false
;
...
...
test/fuzztest/
ReadFileInDir_fuzzer/
ReadFileInDir_fuzzer.h
→
test/fuzztest/
test_startup_ReadFileInDir_fuzzer/test_startup_
ReadFileInDir_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_READFILEINDIR_FUZZER_H
#define TEST_FUZZTEST_READFILEINDIR_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "ReadFileInDir_fuzzer"
#endif
test/fuzztest/
ServiceControlStart_fuzzer/
ServiceControlStart_fuzzer.cpp
→
test/fuzztest/
test_startup_ServiceControlStart_fuzzer/test_startup_
ServiceControlStart_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,14 +13,14 @@
* limitations under the License.
*/
#include "ServiceControlStart_fuzzer.h"
#include "
test_startup_
ServiceControlStart_fuzzer.h"
#include "service_control.h"
namespace
OHOS
{
bool
FuzzServiceControlStart
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
ServiceControl
(
reinterpret_cast
<
const
char
*>
(
data
)
),
START
)
{
if
(
!
ServiceControl
(
reinterpret_cast
<
const
char
*>
(
data
)
,
START
)
)
{
result
=
true
;
}
return
result
;
...
...
test/fuzztest/
ServiceControlStart_fuzzer/
ServiceControlStart_fuzzer.h
→
test/fuzztest/
test_startup_ServiceControlStart_fuzzer/test_startup_
ServiceControlStart_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_STARTDYNAMICPROCESS_FUZZER_H
#define TEST_FUZZTEST_STARTDYNAMICPROCESS_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "ServiceControlStart_fuzzer"
#endif
test/fuzztest/
ServiceControlStop_fuzzer/
ServiceControlStop_fuzzer.cpp
→
test/fuzztest/
test_startup_ServiceControlStop_fuzzer/test_startup_
ServiceControlStop_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,14 +13,14 @@
* limitations under the License.
*/
#include "ServiceControlStop_fuzzer.h"
#include "
test_startup_
ServiceControlStop_fuzzer.h"
#include "service_control.h"
namespace
OHOS
{
bool
FuzzServiceControlStop
(
const
uint8_t
*
data
,
size_t
size
)
{
bool
result
=
false
;
if
(
!
ServiceControl
(
reinterpret_cast
<
const
char
*>
(
data
)
),
STOP
)
{
if
(
!
ServiceControl
(
reinterpret_cast
<
const
char
*>
(
data
)
,
STOP
)
)
{
result
=
true
;
}
return
result
;
...
...
test/fuzztest/
ServiceControlStop_fuzzer/
ServiceControlStop_fuzzer.h
→
test/fuzztest/
test_startup_ServiceControlStop_fuzzer/test_startup_
ServiceControlStop_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_STOPDYNAMICPROCESS_FUZZER_H
#define TEST_FUZZTEST_STOPDYNAMICPROCESS_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "ServiceControlStop_fuzzer"
#endif
test/fuzztest/
SystemDumpParameters_fuzzer/
SystemDumpParameters_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemDumpParameters_fuzzer/test_startup_
SystemDumpParameters_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemDumpParameters_fuzzer.h"
#include "
test_startup_
SystemDumpParameters_fuzzer.h"
#include "sys_param.h"
#include "fuzz_utils.h"
...
...
test/fuzztest/
SystemDumpParameters_fuzzer/
SystemDumpParameters_fuzzer.h
→
test/fuzztest/
test_startup_SystemDumpParameters_fuzzer/test_startup_
SystemDumpParameters_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMDUMPPARAMETERS_FUZZER_H
#define TEST_FUZZTEST_SYSTEMDUMPPARAMETERS_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemDumpParameters_fuzzer"
#endif
test/fuzztest/
SystemFindParameter_fuzzer/
SystemFindParameter_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemFindParameter_fuzzer/test_startup_
SystemFindParameter_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemFindParameter_fuzzer.h"
#include "
test_startup_
SystemFindParameter_fuzzer.h"
#include "sys_param.h"
static
ParamHandle
handle
;
...
...
test/fuzztest/
SystemFindParameter_fuzzer/
SystemFindParameter_fuzzer.h
→
test/fuzztest/
test_startup_SystemFindParameter_fuzzer/test_startup_
SystemFindParameter_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMFINDPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMFINDPARAMETER_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemFindParameter_fuzzer"
#endif
test/fuzztest/
SystemGetParameterCommitId_fuzzer/
SystemGetParameterCommitId_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemGetParameterCommitId_fuzzer/test_startup_
SystemGetParameterCommitId_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemGetParameterCommitId_fuzzer.h"
#include "
test_startup_
SystemGetParameterCommitId_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
test/fuzztest/
SystemGetParameterCommitId_fuzzer/
SystemGetParameterCommitId_fuzzer.h
→
test/fuzztest/
test_startup_SystemGetParameterCommitId_fuzzer/test_startup_
SystemGetParameterCommitId_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMGETPARAMETERCOMMITID_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETERCOMMITID_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemGetParameterCommitId_fuzzer"
#endif
test/fuzztest/
SystemGetParameterName_fuzzer/
SystemGetParameterName_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemGetParameterName_fuzzer/test_startup_
SystemGetParameterName_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemGetParameterName_fuzzer.h"
#include "
test_startup_
SystemGetParameterName_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
test/fuzztest/
SystemGetParameterName_fuzzer/
SystemGetParameterName_fuzzer.h
→
test/fuzztest/
test_startup_SystemGetParameterName_fuzzer/test_startup_
SystemGetParameterName_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMGETPARAMETERNAME_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETERNAME_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemGetParameterName_fuzzer"
#endif
test/fuzztest/
SystemGetParameterValue_fuzzer/
SystemGetParameterValue_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemGetParameterValue_fuzzer/test_startup_
SystemGetParameterValue_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemGetParameterValue_fuzzer.h"
#include "
test_startup_
SystemGetParameterValue_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
test/fuzztest/
SystemGetParameterValue_fuzzer/
SystemGetParameterValue_fuzzer.h
→
test/fuzztest/
test_startup_SystemGetParameterValue_fuzzer/test_startup_
SystemGetParameterValue_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMGETPARAMETERVALUE_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETERVALUE_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemGetParameterValue_fuzzer"
#endif
test/fuzztest/
SystemGetParameter_fuzzer/
SystemGetParameter_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemGetParameter_fuzzer/test_startup_
SystemGetParameter_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemGetParameter_fuzzer.h"
#include "
test_startup_
SystemGetParameter_fuzzer.h"
#include <iostream>
#include "sys_param.h"
...
...
test/fuzztest/
SystemGetParameter_fuzzer/
SystemGetParameter_fuzzer.h
→
test/fuzztest/
test_startup_SystemGetParameter_fuzzer/test_startup_
SystemGetParameter_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMGETPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMGETPARAMETER_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemGetParameter_fuzzer"
#endif
test/fuzztest/
SystemSetParameter_fuzzer/
SystemSetParameter_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemSetParameter_fuzzer/test_startup_
SystemSetParameter_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemSetParameter_fuzzer.h"
#include "
test_startup_
SystemSetParameter_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
test/fuzztest/
SystemSetParameter_fuzzer/
SystemSetParameter_fuzzer.h
→
test/fuzztest/
test_startup_SystemSetParameter_fuzzer/test_startup_
SystemSetParameter_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMSETPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMSETPARAMETER_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemSetParameter_fuzzer"
#endif
test/fuzztest/
SystemTraversalParameter_fuzzer/
SystemTraversalParameter_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemTraversalParameter_fuzzer/test_startup_
SystemTraversalParameter_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemTraversalParameter_fuzzer.h"
#include "
test_startup_
SystemTraversalParameter_fuzzer.h"
#include "fuzz_utils.h"
#include "init.h"
...
...
@@ -51,7 +51,7 @@ namespace OHOS {
if
(
ret
!=
EOK
)
{
return
false
;
}
if
(
!
SystemTraversalParameter
(
FakeShowParam
,
reinterpret_cast
<
void
*>
(
cookie
)))
{
if
(
!
SystemTraversalParameter
(
nullptr
,
FakeShowParam
,
reinterpret_cast
<
void
*>
(
cookie
)))
{
result
=
true
;
}
free
(
cookie
->
data
);
...
...
test/fuzztest/
SystemTraversalParameter_fuzzer/
SystemTraversalParameter_fuzzer.h
→
test/fuzztest/
test_startup_SystemTraversalParameter_fuzzer/test_startup_
SystemTraversalParameter_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,6 +15,7 @@
#ifndef TEST_FUZZTEST_SYSTEMTRAVERSALPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMTRAVERSALPARAMETER_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemTraversalParameter_fuzzer"
typedef
struct
{
...
...
test/fuzztest/
SystemWaitParameter_fuzzer/
SystemWaitParameter_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemWaitParameter_fuzzer/test_startup_
SystemWaitParameter_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemWaitParameter_fuzzer.h"
#include "
test_startup_
SystemWaitParameter_fuzzer.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
test/fuzztest/
SystemWaitParameter_fuzzer/
SystemWaitParameter_fuzzer.h
→
test/fuzztest/
test_startup_SystemWaitParameter_fuzzer/test_startup_
SystemWaitParameter_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMWAITPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMWAITPARAMETER_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemWaitParameter_fuzzer"
#endif
test/fuzztest/
SystemWatchParameter_fuzzer/
SystemWatchParameter_fuzzer.cpp
→
test/fuzztest/
test_startup_SystemWatchParameter_fuzzer/test_startup_
SystemWatchParameter_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "SystemWatchParameter_fuzzer.h"
#include "
test_startup_
SystemWatchParameter_fuzzer.h"
#include "init.h"
#include "sys_param.h"
...
...
test/fuzztest/
SystemWatchParameter_fuzzer/
SystemWatchParameter_fuzzer.h
→
test/fuzztest/
test_startup_SystemWatchParameter_fuzzer/test_startup_
SystemWatchParameter_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_SYSTEMWATCHPARAMETER_FUZZER_H
#define TEST_FUZZTEST_SYSTEMWATCHPARAMETER_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "SystemWatchParameter_fuzzer"
#endif
test/fuzztest/
UmountAllFstab_fuzzer/
UmountAllFstab_fuzzer.cpp
→
test/fuzztest/
test_startup_UmountAllFstab_fuzzer/test_startup_
UmountAllFstab_fuzzer.cpp
浏览文件 @
76dc5f3c
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
#include "UmountAllFstab_fuzzer.h"
#include "
test_startup_
UmountAllFstab_fuzzer.h"
#include <iostream>
#include "fs_manager/fs_manager.h"
...
...
@@ -29,7 +29,7 @@ namespace OHOS {
std
::
cout
<<
"[fuzz] open file fstab.test failed"
;
return
false
;
}
if
(
reinterpret_cast
<
int
>
(
fwrite
(
data
,
1
,
size
,
pFile
)
)
!=
size
)
{
if
(
fwrite
(
data
,
1
,
size
,
pFile
)
!=
size
)
{
std
::
cout
<<
"[fuzz] write data to fstab.test failed"
;
(
void
)
fclose
(
pFile
);
return
false
;
...
...
test/fuzztest/
UmountAllFstab_fuzzer/
UmountAllFstab_fuzzer.h
→
test/fuzztest/
test_startup_UmountAllFstab_fuzzer/test_startup_
UmountAllFstab_fuzzer.h
浏览文件 @
76dc5f3c
...
...
@@ -15,5 +15,6 @@
#ifndef TEST_FUZZTEST_UMOUNTALLFSTAB_FUZZER_H
#define TEST_FUZZTEST_UMOUNTALLFSTAB_FUZZER_H
#include "fuzz_utils.h"
#define FUZZ_PROJECT_NAME "UmountAllFstab_fuzzer"
#endif
test/fuzztest/utils/include/fuzz_utils.h
浏览文件 @
76dc5f3c
...
...
@@ -15,6 +15,8 @@
#ifndef FUZZ_UTILS_H
#define FUZZ_UTILS_H
#include <stdint.h>
#include <stdlib.h>
void
CloseStdout
(
void
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录