Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
85a97645
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看板
未验证
提交
85a97645
编写于
3月 02, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 02, 2022
浏览文件
操作
浏览文件
下载
差异文件
!358 fix: fuzztest code build problem
Merge pull request !358 from 熊磊/init0302xyt
上级
af738a82
7ae285e2
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
81 addition
and
22 deletion
+81
-22
bundle.json
bundle.json
+2
-1
test/fuzztest/BUILD.gn
test/fuzztest/BUILD.gn
+53
-15
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.h
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.h
+1
-0
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.h
test/fuzztest/GetControlFile_fuzzer/GetControlFile_fuzzer.h
+1
-0
test/fuzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.h
...uzztest/GetControlSocket_fuzzer/GetControlSocket_fuzzer.h
+1
-0
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.cpp
+1
-1
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.h
test/fuzztest/MountAllFstab_fuzzer/MountAllFstab_fuzzer.h
+1
-0
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.cpp
+1
-1
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.h
test/fuzztest/ReadFileInDir_fuzzer/ReadFileInDir_fuzzer.h
+1
-0
test/fuzztest/ServiceControlStart_fuzzer/ServiceControlStart_fuzzer.cpp
...ServiceControlStart_fuzzer/ServiceControlStart_fuzzer.cpp
+1
-1
test/fuzztest/ServiceControlStart_fuzzer/ServiceControlStart_fuzzer.h
...t/ServiceControlStart_fuzzer/ServiceControlStart_fuzzer.h
+1
-0
test/fuzztest/ServiceControlStop_fuzzer/ServiceControlStop_fuzzer.cpp
...t/ServiceControlStop_fuzzer/ServiceControlStop_fuzzer.cpp
+1
-1
test/fuzztest/ServiceControlStop_fuzzer/ServiceControlStop_fuzzer.h
...est/ServiceControlStop_fuzzer/ServiceControlStop_fuzzer.h
+1
-0
test/fuzztest/SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.h
...SystemDumpParameters_fuzzer/SystemDumpParameters_fuzzer.h
+1
-0
test/fuzztest/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.h
...t/SystemFindParameter_fuzzer/SystemFindParameter_fuzzer.h
+1
-0
test/fuzztest/SystemGetParameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.h
...ameterCommitId_fuzzer/SystemGetParameterCommitId_fuzzer.h
+1
-0
test/fuzztest/SystemGetParameterName_fuzzer/SystemGetParameterName_fuzzer.h
...emGetParameterName_fuzzer/SystemGetParameterName_fuzzer.h
+1
-0
test/fuzztest/SystemGetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.h
...GetParameterValue_fuzzer/SystemGetParameterValue_fuzzer.h
+1
-0
test/fuzztest/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.h
...est/SystemGetParameter_fuzzer/SystemGetParameter_fuzzer.h
+1
-0
test/fuzztest/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.h
...est/SystemSetParameter_fuzzer/SystemSetParameter_fuzzer.h
+1
-0
test/fuzztest/SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp
...ersalParameter_fuzzer/SystemTraversalParameter_fuzzer.cpp
+1
-1
test/fuzztest/SystemTraversalParameter_fuzzer/SystemTraversalParameter_fuzzer.h
...aversalParameter_fuzzer/SystemTraversalParameter_fuzzer.h
+1
-0
test/fuzztest/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.h
...t/SystemWaitParameter_fuzzer/SystemWaitParameter_fuzzer.h
+1
-0
test/fuzztest/SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.h
...SystemWatchParameter_fuzzer/SystemWatchParameter_fuzzer.h
+1
-0
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp
.../fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.cpp
+1
-1
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.h
test/fuzztest/UmountAllFstab_fuzzer/UmountAllFstab_fuzzer.h
+1
-0
test/fuzztest/utils/include/fuzz_utils.h
test/fuzztest/utils/include/fuzz_utils.h
+2
-0
未找到文件。
bundle.json
浏览文件 @
85a97645
...
...
@@ -77,7 +77,8 @@
}
],
"test"
:
[
"//base/startup/init_lite/test/unittest:init_test"
"//base/startup/init_lite/test/unittest:init_test"
,
"//base/startup/init_lite/test/fuzztest:fuzztest"
]
}
}
...
...
test/fuzztest/BUILD.gn
浏览文件 @
85a97645
...
...
@@ -30,7 +30,10 @@ ohos_static_library("libfuzz_utils") {
ohos_fuzztest("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",
...
...
@@ -53,7 +56,10 @@ ohos_fuzztest("DoRebootFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -76,7 +82,10 @@ ohos_fuzztest("GetControlFileFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -128,6 +137,7 @@ ohos_fuzztest("ReadFileInDirFuzzTest") {
include_dirs = [
"//base/startup/init_lite/services/init/include",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/test/fuzztest/utils/include",
]
deps = [
...
...
@@ -150,7 +160,10 @@ ohos_fuzztest("ReadFileInDirFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -171,7 +184,10 @@ ohos_fuzztest("ServiceControlStartFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -219,7 +235,10 @@ ohos_fuzztest("SystemDumpParametersFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -242,7 +261,10 @@ ohos_fuzztest("SystemFindParameterFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -265,7 +287,10 @@ ohos_fuzztest("SystemGetParameterFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -290,7 +315,10 @@ ohos_fuzztest("SystemGetParameterCommitIdFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -314,7 +342,10 @@ ohos_fuzztest("SystemGetParameterNameFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -338,7 +369,10 @@ ohos_fuzztest("SystemGetParameterValueFuzzTest") {
ohos_fuzztest("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",
...
...
@@ -391,7 +425,10 @@ ohos_fuzztest("SystemTraversalParameterFuzztest") {
ohos_fuzztest("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",
...
...
@@ -417,6 +454,7 @@ ohos_fuzztest("SystemWatchParameterFuzzTest") {
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 = [
...
...
@@ -454,7 +492,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",
...
...
@@ -483,8 +521,8 @@ group("fuzztest") {
":GetControlSocketFuzzTest",
":MountAllFstabFuzzTest",
":ReadFileInDirFuzzTest",
":S
tartDynamicProcess
FuzzTest",
":S
topDynamicProcess
FuzzTest",
":S
erviceControlStart
FuzzTest",
":S
erviceControlStop
FuzzTest",
":SystemDumpParametersFuzzTest",
":SystemFindParameterFuzzTest",
":SystemGetParameterCommitIdFuzzTest",
...
...
test/fuzztest/DoReboot_fuzzer/DoReboot_fuzzer.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -20,7 +20,7 @@ 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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -20,7 +20,7 @@ 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
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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.h
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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
浏览文件 @
85a97645
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录