Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
f523d7a9
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f523d7a9
编写于
7月 09, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
!339 修复了文件系统中jffs的全量用例和压测用例中出现的问题
Merge pull request !339 from phchang/fixjffs
上级
d7387508
e57dc776
变更
55
隐藏空白更改
内联
并排
Showing
55 changed file
with
128 addition
and
136 deletion
+128
-136
testsuites/unittest/config.gni
testsuites/unittest/config.gni
+1
-1
testsuites/unittest/fs/BUILD.gn
testsuites/unittest/fs/BUILD.gn
+4
-4
testsuites/unittest/fs/jffs/It_vfs_jffs.h
testsuites/unittest/fs/jffs/It_vfs_jffs.h
+1
-1
testsuites/unittest/fs/jffs/full/It_jffs_011.cpp
testsuites/unittest/fs/jffs/full/It_jffs_011.cpp
+1
-1
testsuites/unittest/fs/jffs/full/It_jffs_012.cpp
testsuites/unittest/fs/jffs/full/It_jffs_012.cpp
+1
-1
testsuites/unittest/fs/jffs/full/It_vfs_jffs_045.cpp
testsuites/unittest/fs/jffs/full/It_vfs_jffs_045.cpp
+1
-1
testsuites/unittest/fs/jffs/full/It_vfs_jffs_077.cpp
testsuites/unittest/fs/jffs/full/It_vfs_jffs_077.cpp
+1
-0
testsuites/unittest/fs/jffs/full/It_vfs_jffs_078.cpp
testsuites/unittest/fs/jffs/full/It_vfs_jffs_078.cpp
+1
-1
testsuites/unittest/fs/jffs/full/It_vfs_jffs_215.cpp
testsuites/unittest/fs/jffs/full/It_vfs_jffs_215.cpp
+1
-1
testsuites/unittest/fs/jffs/full/It_vfs_jffs_427.cpp
testsuites/unittest/fs/jffs/full/It_vfs_jffs_427.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_performance_009.cpp
.../unittest/fs/jffs/pressure/It_fs_jffs_performance_009.cpp
+2
-0
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_023.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_023.cpp
+5
-4
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_026.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_026.cpp
+3
-2
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_033.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_033.cpp
+1
-1
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_047.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_047.cpp
+2
-2
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_052.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_052.cpp
+2
-1
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_310.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_310.cpp
+2
-2
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_311.cpp
...tes/unittest/fs/jffs/pressure/It_fs_jffs_pressure_311.cpp
+3
-2
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_002.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_002.cpp
+15
-12
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_014.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_014.cpp
+1
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_015.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_015.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_016.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_016.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_017.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_017.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_018.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_018.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_019.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_019.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_020.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_020.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_021.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_021.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_022.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_022.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_023.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_023.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_024.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_024.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_025.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_025.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_036.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_036.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_038.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_038.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_039.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_039.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_040.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_040.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_041.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_041.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_042.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_042.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_043.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_043.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_044.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_044.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_045.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_045.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_046.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_046.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_047.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_047.cpp
+3
-3
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_052.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_052.cpp
+0
-2
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_053.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_053.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_054.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_054.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_055.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_055.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_056.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_056.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_057.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_057.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_058.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_058.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_059.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_059.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_060.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_060.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_061.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_061.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_062.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_062.cpp
+0
-1
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_063.cpp
...nittest/fs/jffs/pressure/It_vfs_jffs_multipthread_063.cpp
+0
-1
testsuites/unittest/fs/jffs/vfs_jffs_test.cpp
testsuites/unittest/fs/jffs/vfs_jffs_test.cpp
+11
-16
未找到文件。
testsuites/unittest/config.gni
浏览文件 @
f523d7a9
...
@@ -73,4 +73,4 @@ LOSCFG_USER_TEST_SIGNAL = true
...
@@ -73,4 +73,4 @@ LOSCFG_USER_TEST_SIGNAL = true
LOSCFG_USER_TEST_SYS = true
LOSCFG_USER_TEST_SYS = true
LOSCFG_USER_TEST_TIME_CLOCK = true
LOSCFG_USER_TEST_TIME_CLOCK = true
LOSCFG_USER_TEST_TIME_TIMER = true
LOSCFG_USER_TEST_TIME_TIMER = true
LOSCFG_USER_TEST_UTIL = true
LOSCFG_USER_TEST_UTIL = true
\ No newline at end of file
testsuites/unittest/fs/BUILD.gn
浏览文件 @
f523d7a9
...
@@ -55,7 +55,7 @@ sources_smoke = [
...
@@ -55,7 +55,7 @@ sources_smoke = [
"jffs/smoke/It_vfs_jffs_035.cpp",
"jffs/smoke/It_vfs_jffs_035.cpp",
"jffs/smoke/It_vfs_jffs_094.cpp",
"jffs/smoke/It_vfs_jffs_094.cpp",
"jffs/smoke/It_vfs_jffs_095.cpp",
"jffs/smoke/It_vfs_jffs_095.cpp",
#
"jffs/smoke/It_vfs_jffs_103.cpp",
"jffs/smoke/It_vfs_jffs_103.cpp",
"jffs/smoke/It_vfs_jffs_535.cpp",
"jffs/smoke/It_vfs_jffs_535.cpp",
"jffs/smoke/It_vfs_jffs_Dac_001.cpp",
"jffs/smoke/It_vfs_jffs_Dac_001.cpp",
]
]
...
@@ -128,7 +128,7 @@ sources_pressure = [
...
@@ -128,7 +128,7 @@ sources_pressure = [
"jffs/pressure/It_fs_jffs_pressure_053.cpp",
"jffs/pressure/It_fs_jffs_pressure_053.cpp",
"jffs/pressure/It_fs_jffs_pressure_301.cpp",
"jffs/pressure/It_fs_jffs_pressure_301.cpp",
"jffs/pressure/It_fs_jffs_pressure_302.cpp",
"jffs/pressure/It_fs_jffs_pressure_302.cpp",
#
"jffs/pressure/It_fs_jffs_pressure_303.cpp",
"jffs/pressure/It_fs_jffs_pressure_303.cpp",
"jffs/pressure/It_fs_jffs_pressure_304.cpp",
"jffs/pressure/It_fs_jffs_pressure_304.cpp",
"jffs/pressure/It_fs_jffs_pressure_305.cpp",
"jffs/pressure/It_fs_jffs_pressure_305.cpp",
"jffs/pressure/It_fs_jffs_pressure_306.cpp",
"jffs/pressure/It_fs_jffs_pressure_306.cpp",
...
@@ -289,7 +289,7 @@ sources_full = [
...
@@ -289,7 +289,7 @@ sources_full = [
"jffs/full/It_vfs_jffs_048.cpp",
"jffs/full/It_vfs_jffs_048.cpp",
"jffs/full/It_vfs_jffs_049.cpp",
"jffs/full/It_vfs_jffs_049.cpp",
"jffs/full/It_vfs_jffs_050.cpp",
"jffs/full/It_vfs_jffs_050.cpp",
#
"jffs/full/It_vfs_jffs_051.cpp",
"jffs/full/It_vfs_jffs_051.cpp",
"jffs/full/It_vfs_jffs_053.cpp",
"jffs/full/It_vfs_jffs_053.cpp",
"jffs/full/It_vfs_jffs_055.cpp",
"jffs/full/It_vfs_jffs_055.cpp",
"jffs/full/It_vfs_jffs_056.cpp",
"jffs/full/It_vfs_jffs_056.cpp",
...
@@ -837,4 +837,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
...
@@ -837,4 +837,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
configs = [ "..:public_config_for_pressure" ]
configs = [ "..:public_config_for_pressure" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
}
}
\ No newline at end of file
testsuites/unittest/fs/jffs/It_vfs_jffs.h
浏览文件 @
f523d7a9
...
@@ -137,7 +137,7 @@ constexpr int JFFS_MAX_DEF_BUF_NUM = 21;
...
@@ -137,7 +137,7 @@ constexpr int JFFS_MAX_DEF_BUF_NUM = 21;
constexpr
int
JFFS_FILE_LIMITTED_NUM
=
200
;
constexpr
int
JFFS_FILE_LIMITTED_NUM
=
200
;
constexpr
int
JFFS_FILE_SIZE_TEST
=
100
*
1024
*
1024
;
// *1024
constexpr
int
JFFS_FILE_SIZE_TEST
=
100
*
1024
*
1024
;
// *1024
constexpr
int
JFFS_PERFORMANCE_W_R_SIZE
=
10
*
1024
*
1024
;
constexpr
int
JFFS_PERFORMANCE_W_R_SIZE
=
5
*
1024
*
1024
;
constexpr
int
JFFS_FILE_PER_WRITE_SIZE
=
5
*
1024
*
1024
;
constexpr
int
JFFS_FILE_PER_WRITE_SIZE
=
5
*
1024
*
1024
;
constexpr
int
JFFS_PRESSURE_W_R_SIZE1
=
1
*
1024
*
1024
;
constexpr
int
JFFS_PRESSURE_W_R_SIZE1
=
1
*
1024
*
1024
;
constexpr
int
JFFS_PRESSURE_W_R_SIZE2
=
5
*
1024
*
1024
;
constexpr
int
JFFS_PRESSURE_W_R_SIZE2
=
5
*
1024
*
1024
;
...
...
testsuites/unittest/fs/jffs/full/It_jffs_011.cpp
浏览文件 @
f523d7a9
...
@@ -40,7 +40,7 @@ static UINT32 Testcase(VOID)
...
@@ -40,7 +40,7 @@ static UINT32 Testcase(VOID)
CHAR
*
pfd
=
NULL
;
CHAR
*
pfd
=
NULL
;
ret
=
chdir
(
pathname1
);
ret
=
chdir
(
pathname1
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
ret
,
JFFS_IS_ERROR
,
ret
,
EXIT
);
pfd
=
mktemp
(
tempFile
);
pfd
=
mktemp
(
tempFile
);
ICUNIT_GOTO_NOT_EQUAL
(
pfd
,
NULL
,
pfd
,
EXIT1
);
ICUNIT_GOTO_NOT_EQUAL
(
pfd
,
NULL
,
pfd
,
EXIT1
);
...
...
testsuites/unittest/fs/jffs/full/It_jffs_012.cpp
浏览文件 @
f523d7a9
...
@@ -40,7 +40,7 @@ static UINT32 Testcase(VOID)
...
@@ -40,7 +40,7 @@ static UINT32 Testcase(VOID)
CHAR
*
pfd
=
NULL
;
CHAR
*
pfd
=
NULL
;
ret
=
chdir
(
pathname1
);
ret
=
chdir
(
pathname1
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
ret
,
JFFS_IS_ERROR
,
ret
,
EXIT
);
pfd
=
mkdtemp
(
tempFile
);
pfd
=
mkdtemp
(
tempFile
);
ICUNIT_GOTO_NOT_EQUAL
(
pfd
,
NULL
,
pfd
,
EXIT1
);
ICUNIT_GOTO_NOT_EQUAL
(
pfd
,
NULL
,
pfd
,
EXIT1
);
...
...
testsuites/unittest/fs/jffs/full/It_vfs_jffs_045.cpp
浏览文件 @
f523d7a9
...
@@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
...
@@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_NOT_EQUAL
(
fd1
,
-
1
,
fd1
,
EXIT3
);
ICUNIT_GOTO_NOT_EQUAL
(
fd1
,
-
1
,
fd1
,
EXIT3
);
len
=
read
(
fd1
,
readbuf
,
JFFS_STANDARD_NAME_LENGTH
);
len
=
read
(
fd1
,
readbuf
,
JFFS_STANDARD_NAME_LENGTH
);
ICUNIT_GOTO_EQUAL
(
len
,
0
,
len
,
EXIT3
);
ICUNIT_GOTO_EQUAL
(
len
,
10
,
len
,
EXIT3
);
// 10 means read size
len
=
write
(
fd1
,
"abcde"
,
6
);
// 6 means write len
len
=
write
(
fd1
,
"abcde"
,
6
);
// 6 means write len
ICUNIT_GOTO_EQUAL
(
len
,
6
,
len
,
EXIT3
);
ICUNIT_GOTO_EQUAL
(
len
,
6
,
len
,
EXIT3
);
...
...
testsuites/unittest/fs/jffs/full/It_vfs_jffs_077.cpp
浏览文件 @
f523d7a9
...
@@ -47,6 +47,7 @@ static UINT32 Testcase(VOID)
...
@@ -47,6 +47,7 @@ static UINT32 Testcase(VOID)
ret
=
mkdir
(
pathname1
,
HIGHEST_AUTHORITY
);
ret
=
mkdir
(
pathname1
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT1
);
strcat_s
(
pathname2
,
sizeof
(
pathname2
),
"/test"
);
strcat_s
(
pathname2
,
sizeof
(
pathname2
),
"/test"
);
strcat_s
(
pathname2
,
sizeof
(
pathname2
),
"/test"
);
ret
=
mkdir
(
pathname2
,
HIGHEST_AUTHORITY
);
ret
=
mkdir
(
pathname2
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT2
);
...
...
testsuites/unittest/fs/jffs/full/It_vfs_jffs_078.cpp
浏览文件 @
f523d7a9
...
@@ -48,7 +48,7 @@ static UINT32 Testcase(VOID)
...
@@ -48,7 +48,7 @@ static UINT32 Testcase(VOID)
fd1
=
open
(
pathname1
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd1
=
open
(
pathname1
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd1
,
-
1
,
fd1
,
EXIT1
);
ICUNIT_GOTO_NOT_EQUAL
(
fd1
,
-
1
,
fd1
,
EXIT1
);
strcat_s
(
pathname2
,
sizeof
(
pathname2
),
"/
te
st"
);
strcat_s
(
pathname2
,
sizeof
(
pathname2
),
"/
TE
st"
);
fd2
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd2
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd2
,
-
1
,
fd2
,
EXIT2
);
ICUNIT_GOTO_NOT_EQUAL
(
fd2
,
-
1
,
fd2
,
EXIT2
);
...
...
testsuites/unittest/fs/jffs/full/It_vfs_jffs_215.cpp
浏览文件 @
f523d7a9
...
@@ -48,7 +48,7 @@ static UINT32 TestCase(VOID)
...
@@ -48,7 +48,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_NOT_EQUAL
(
pret
,
NULL
,
pret
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
pret
,
NULL
,
pret
,
EXIT
);
ICUNIT_GOTO_STRING_EQUAL
(
buf
,
JFFS_PATH_NAME0
,
buf
,
EXIT
);
ICUNIT_GOTO_STRING_EQUAL
(
buf
,
JFFS_PATH_NAME0
,
buf
,
EXIT
);
pret
=
getcwd
(
buf
,
JFFS_STANDARD_NAME_LENGTH
);
pret
=
getcwd
(
buf
,
5
);
// 5 is less than path length
ICUNIT_GOTO_EQUAL
(
pret
,
NULL
,
pret
,
EXIT
);
ICUNIT_GOTO_EQUAL
(
pret
,
NULL
,
pret
,
EXIT
);
ICUNIT_GOTO_EQUAL
(
errno
,
ERANGE
,
errno
,
EXIT
);
ICUNIT_GOTO_EQUAL
(
errno
,
ERANGE
,
errno
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/full/It_vfs_jffs_427.cpp
浏览文件 @
f523d7a9
...
@@ -105,12 +105,12 @@ static UINT32 Testcase(VOID)
...
@@ -105,12 +105,12 @@ static UINT32 Testcase(VOID)
memset
(
bufW2
,
0
,
JFFS_SHORT_ARRAY_LENGTH
+
1
);
memset
(
bufW2
,
0
,
JFFS_SHORT_ARRAY_LENGTH
+
1
);
off
=
lseek
(
fd3
,
0
,
SEEK_SET
);
off
=
lseek
(
fd3
,
0
,
SEEK_SET
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT6
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT6
);
g_jffsIov
[
0
].
iov_base
=
bufW1
;
g_jffsIov
[
0
].
iov_base
=
bufW1
;
g_jffsIov
[
0
].
iov_len
=
0xffff
;
g_jffsIov
[
0
].
iov_len
=
JFFS_SHORT_ARRAY_LENGTH
;
g_jffsIov
[
1
].
iov_base
=
bufW2
;
g_jffsIov
[
1
].
iov_base
=
bufW2
;
g_jffsIov
[
1
].
iov_len
=
0xffff
;
g_jffsIov
[
1
].
iov_len
=
JFFS_SHORT_ARRAY_LENGTH
;
lenV
=
readv
(
fd3
,
g_jffsIov
,
2
);
// reads 2 buffers from the fd
lenV
=
readv
(
fd3
,
g_jffsIov
,
2
);
// reads 2 buffers from the fd
ICUNIT_GOTO_EQUAL
(
lenV
,
20
,
lenV
,
EXIT6
);
// compare ret lenV to target 20 lenV
ICUNIT_GOTO_EQUAL
(
lenV
,
20
,
lenV
,
EXIT6
);
// compare ret lenV to target 20 lenV
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_performance_009.cpp
浏览文件 @
f523d7a9
...
@@ -75,6 +75,8 @@ static UINT32 TestCase(VOID)
...
@@ -75,6 +75,8 @@ static UINT32 TestCase(VOID)
len
=
write
(
fd
[
index
],
bufW
,
strlen
(
bufW
));
len
=
write
(
fd
[
index
],
bufW
,
strlen
(
bufW
));
if
(
len
<=
0
)
{
if
(
len
<=
0
)
{
flag
=
1
;
flag
=
1
;
ret
=
close
(
fd
[
index
]);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
break
;
break
;
}
}
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_023.cpp
浏览文件 @
f523d7a9
...
@@ -38,6 +38,7 @@ static UINT32 TestCase(VOID)
...
@@ -38,6 +38,7 @@ static UINT32 TestCase(VOID)
INT32
i
=
0
;
INT32
i
=
0
;
INT32
j
=
0
;
INT32
j
=
0
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
jffsPressureCycles
=
4
;
// write size 4 * 1024 * 1024
signed
long
long
offset
;
signed
long
long
offset
;
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
...
@@ -101,11 +102,11 @@ static UINT32 TestCase(VOID)
...
@@ -101,11 +102,11 @@ static UINT32 TestCase(VOID)
fd
=
open
(
pathname1
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname1
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
-
1
,
fd
,
EXIT2
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
-
1
,
fd
,
EXIT2
);
for
(
j
=
0
;
j
<
JFFS_PRESSURE_CYCLES
;
j
++
)
{
for
(
j
=
0
;
j
<
jffsPressureCycles
;
j
++
)
{
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
ICUNIT_GOTO_EQUAL
(
off
,
0
,
off
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
off
,
0
,
off
,
EXIT2
);
for
(
i
=
0
;
i
<
JFFS_PRESSURE_CYCLES
;
i
++
)
{
for
(
i
=
0
;
i
<
jffsPressureCycles
;
i
++
)
{
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
printf
(
"cnt=%d %d
\n
"
,
i
,
j
);
printf
(
"cnt=%d %d
\n
"
,
i
,
j
);
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
...
@@ -115,8 +116,8 @@ static UINT32 TestCase(VOID)
...
@@ -115,8 +116,8 @@ static UINT32 TestCase(VOID)
}
}
ret
=
stat
(
pathname1
,
&
statfile
);
ret
=
stat
(
pathname1
,
&
statfile
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
// file size:
10
* 1024 * 1024
// file size:
4
* 1024 * 1024
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
10
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
4
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
}
}
ret
=
close
(
fd
);
ret
=
close
(
fd
);
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_026.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static UINT32 TestCase(VOID)
...
@@ -44,7 +44,7 @@ static UINT32 TestCase(VOID)
CHAR
readbuf
[
JFFS_STANDARD_NAME_LENGTH
]
=
"liteos"
;
CHAR
readbuf
[
JFFS_STANDARD_NAME_LENGTH
]
=
"liteos"
;
CHAR
bufname
[
JFFS_STANDARD_NAME_LENGTH
]
=
"123"
;
CHAR
bufname
[
JFFS_STANDARD_NAME_LENGTH
]
=
"123"
;
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname2
[
JFFS_
STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname2
[
JFFS_
NAME_LIMITTED_SIZE
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname3
[
JFFS_SHORT_ARRAY_LENGTH
][
JFFS_NAME_LIMITTED_SIZE
]
=
{
0
};
CHAR
pathname3
[
JFFS_SHORT_ARRAY_LENGTH
][
JFFS_NAME_LIMITTED_SIZE
]
=
{
0
};
CHAR
pathname4
[
JFFS_SHORT_ARRAY_LENGTH
][
JFFS_NAME_LIMITTED_SIZE
]
=
{
0
};
CHAR
pathname4
[
JFFS_SHORT_ARRAY_LENGTH
][
JFFS_NAME_LIMITTED_SIZE
]
=
{
0
};
CHAR
pathname5
[
JFFS_SHORT_ARRAY_LENGTH
][
JFFS_NAME_LIMITTED_SIZE
]
=
{
0
};
CHAR
pathname5
[
JFFS_SHORT_ARRAY_LENGTH
][
JFFS_NAME_LIMITTED_SIZE
]
=
{
0
};
...
@@ -67,7 +67,8 @@ static UINT32 TestCase(VOID)
...
@@ -67,7 +67,8 @@ static UINT32 TestCase(VOID)
for
(
i
=
0
;
i
<
JFFS_SHORT_ARRAY_LENGTH
;
i
++
)
{
for
(
i
=
0
;
i
<
JFFS_SHORT_ARRAY_LENGTH
;
i
++
)
{
snprintf_s
(
bufname
,
JFFS_STANDARD_NAME_LENGTH
,
JFFS_STANDARD_NAME_LENGTH
-
1
,
"/test%d"
,
i
);
snprintf_s
(
bufname
,
JFFS_STANDARD_NAME_LENGTH
,
JFFS_STANDARD_NAME_LENGTH
-
1
,
"/test%d"
,
i
);
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
bufname
);
strcat_s
(
pathname2
,
JFFS_NAME_LIMITTED_SIZE
,
bufname
);
strcpy_s
(
pathname3
[
i
],
JFFS_NAME_LIMITTED_SIZE
,
pathname2
);
strcpy_s
(
pathname3
[
i
],
JFFS_NAME_LIMITTED_SIZE
,
pathname2
);
ret
=
mkdir
(
pathname3
[
i
],
HIGHEST_AUTHORITY
);
ret
=
mkdir
(
pathname3
[
i
],
HIGHEST_AUTHORITY
);
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_033.cpp
浏览文件 @
f523d7a9
...
@@ -170,7 +170,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -170,7 +170,7 @@ static VOID *PthreadF02(void *arg)
CHAR
*
bufR
=
NULL
;
CHAR
*
bufR
=
NULL
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
off_t
off
;
off_t
off
;
INT32
bufRSize
=
607
5
;
// 6075
: read length
INT32
bufRSize
=
607
4
;
// 6074
: read length
ret
=
pthread_mutex_lock
(
&
g_jffs2GlobalLock1
);
ret
=
pthread_mutex_lock
(
&
g_jffs2GlobalLock1
);
printf
(
"[%d] Thread2 Start frist get lock
\n
"
,
__LINE__
);
printf
(
"[%d] Thread2 Start frist get lock
\n
"
,
__LINE__
);
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_047.cpp
浏览文件 @
f523d7a9
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
static
VOID
*
PthreadF01
(
void
*
arg
)
static
VOID
*
PthreadF01
(
void
*
arg
)
{
{
INT32
ret
,
len
;
INT32
ret
,
len
;
UINT32
writeSize
=
JFFS_PRESSURE_W_R_SIZE
2
;
UINT32
writeSize
=
JFFS_PRESSURE_W_R_SIZE
1
;
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
writebuf
[
JFFS_STANDARD_NAME_LENGTH
]
=
"0123456789"
;
CHAR
writebuf
[
JFFS_STANDARD_NAME_LENGTH
]
=
"0123456789"
;
CHAR
*
writeBuf
=
NULL
;
CHAR
*
writeBuf
=
NULL
;
...
@@ -66,7 +66,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -66,7 +66,7 @@ static VOID *PthreadF01(void *arg)
printf
(
"[%d]lseek64 off64:%lld Fd:%d
\n
"
,
__LINE__
,
off64
,
g_jffsFd
);
printf
(
"[%d]lseek64 off64:%lld Fd:%d
\n
"
,
__LINE__
,
off64
,
g_jffsFd
);
ICUNIT_GOTO_EQUAL
(
statbuf1
.
st_size
,
off64
,
statbuf1
.
st_size
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
statbuf1
.
st_size
,
off64
,
statbuf1
.
st_size
,
EXIT1
);
len
=
write
(
g_jffsFd
,
write
buf
,
strlen
(
writeb
uf
));
len
=
write
(
g_jffsFd
,
write
Buf
,
strlen
(
writeB
uf
));
printf
(
"[%d]lseek64 len:%d Fd:%d, errno:%d
\n
"
,
__LINE__
,
len
,
g_jffsFd
,
errno
);
printf
(
"[%d]lseek64 len:%d Fd:%d, errno:%d
\n
"
,
__LINE__
,
len
,
g_jffsFd
,
errno
);
ICUNIT_GOTO_EQUAL
(
len
,
JFFS_IS_ERROR
,
len
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
len
,
JFFS_IS_ERROR
,
len
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
errno
,
ENOSPC
,
errno
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
errno
,
ENOSPC
,
errno
,
EXIT1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_052.cpp
浏览文件 @
f523d7a9
...
@@ -98,8 +98,9 @@ static VOID *PthreadF01(void *arg)
...
@@ -98,8 +98,9 @@ static VOID *PthreadF01(void *arg)
testSpeed
);
testSpeed
);
return
NULL
;
return
NULL
;
EXIT:
EXIT
1
:
close
(
g_jffsFd
);
close
(
g_jffsFd
);
EXIT:
return
NULL
;
return
NULL
;
}
}
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_310.cpp
浏览文件 @
f523d7a9
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
static
UINT32
TestCase
(
VOID
)
static
UINT32
TestCase
(
VOID
)
{
{
INT32
ret
,
i
;
INT32
ret
;
INT32
i
=
0
;
INT32
scandirCount
=
0
;
INT32
scandirCount
=
0
;
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname2
[
JFFS_NAME_LIMITTED_SIZE
]
=
""
;
CHAR
pathname2
[
JFFS_NAME_LIMITTED_SIZE
]
=
""
;
...
@@ -52,7 +53,6 @@ static UINT32 TestCase(VOID)
...
@@ -52,7 +53,6 @@ static UINT32 TestCase(VOID)
memset_s
(
pathname2
,
JFFS_NAME_LIMITTED_SIZE
,
0
,
JFFS_NAME_LIMITTED_SIZE
);
memset_s
(
pathname2
,
JFFS_NAME_LIMITTED_SIZE
,
0
,
JFFS_NAME_LIMITTED_SIZE
);
memset_s
(
pathname3
,
JFFS_NAME_LIMITTED_SIZE
,
0
,
JFFS_NAME_LIMITTED_SIZE
);
memset_s
(
pathname3
,
JFFS_NAME_LIMITTED_SIZE
,
0
,
JFFS_NAME_LIMITTED_SIZE
);
strcat_s
(
pathname6
,
JFFS_NAME_LIMITTED_SIZE
,
"/"
);
strcat_s
(
pathname6
,
JFFS_NAME_LIMITTED_SIZE
,
"/"
);
// PATH_MAX test. The dirname has occupied 14 bytes.
// PATH_MAX test. The dirname has occupied 14 bytes.
while
(
i
<
241
)
{
// loop times: 241
while
(
i
<
241
)
{
// loop times: 241
i
++
;
i
++
;
...
...
testsuites/unittest/fs/jffs/pressure/It_fs_jffs_pressure_311.cpp
浏览文件 @
f523d7a9
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
static
UINT32
TestCase
(
VOID
)
static
UINT32
TestCase
(
VOID
)
{
{
INT32
ret
,
i
;
INT32
ret
;
INT32
i
=
0
;
INT32
fd
=
-
1
;
INT32
fd
=
-
1
;
INT32
scandirCount
=
0
;
INT32
scandirCount
=
0
;
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_MAIN_DIR0
};
CHAR
pathname1
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_MAIN_DIR0
};
...
@@ -82,7 +83,7 @@ static UINT32 TestCase(VOID)
...
@@ -82,7 +83,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL
(
strlen
(
pathname3
),
256
,
strlen
(
pathname3
),
EXIT
);
// pathname length: 256
ICUNIT_GOTO_EQUAL
(
strlen
(
pathname3
),
256
,
strlen
(
pathname3
),
EXIT
);
// pathname length: 256
fd
=
open
(
pathname3
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname3
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_EQUAL
(
fd
,
-
1
,
fd
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
fd
,
-
1
,
fd
,
EXIT1
);
ICUNIT_GOTO_EQUAL
(
errno
,
E
NAMETOOLONG
,
errno
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
errno
,
E
INVAL
,
errno
,
EXIT2
);
ret
=
chdir
(
"/"
);
ret
=
chdir
(
"/"
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_002.cpp
浏览文件 @
f523d7a9
...
@@ -40,6 +40,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -40,6 +40,7 @@ static VOID *PthreadF01(void *arg)
INT32
i
=
0
;
INT32
i
=
0
;
INT32
j
=
0
;
INT32
j
=
0
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
jffsMaxCycles
=
1
;
// 1 means 1 * 1024 * 1024 byte size
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
...
@@ -87,7 +88,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -87,7 +88,7 @@ static VOID *PthreadF01(void *arg)
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
"/004.txt"
);
// /storage/test/004.txt
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
"/004.txt"
);
// /storage/test/004.txt
fd1
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd1
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT2
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
1
,
JFFS_IS_ERROR
,
fd1
,
EXIT2
);
len
=
write
(
fd1
,
writebuf
,
strlen
(
writebuf
));
len
=
write
(
fd1
,
writebuf
,
strlen
(
writebuf
));
ICUNIT_GOTO_EQUAL
(
len
,
strlen
(
writebuf
),
len
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
len
,
strlen
(
writebuf
),
len
,
EXIT2
);
...
@@ -112,7 +113,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -112,7 +113,7 @@ static VOID *PthreadF01(void *arg)
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT2
);
for
(
i
=
0
;
i
<
JFFS_MAX_CYCLES
;
i
++
)
{
for
(
i
=
0
;
i
<
jffsMaxCycles
;
i
++
)
{
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
...
@@ -131,8 +132,8 @@ static VOID *PthreadF01(void *arg)
...
@@ -131,8 +132,8 @@ static VOID *PthreadF01(void *arg)
ret
=
stat
(
pathname1
,
&
statfile
);
ret
=
stat
(
pathname1
,
&
statfile
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
//
5
* 1024 * 1024: filesize
//
1
* 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
5
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
1
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ret
=
close
(
fd
);
ret
=
close
(
fd
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
...
@@ -167,6 +168,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -167,6 +168,7 @@ static VOID *PthreadF02(void *arg)
INT32
i
=
0
;
INT32
i
=
0
;
INT32
j
=
0
;
INT32
j
=
0
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
jffsMaxCycles
=
1
;
// 1 means 1 * 1024 * 1024 byte size
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
...
@@ -213,7 +215,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -213,7 +215,7 @@ static VOID *PthreadF02(void *arg)
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
"/005.txt"
);
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
"/005.txt"
);
fd1
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd1
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT2
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
1
,
JFFS_IS_ERROR
,
fd1
,
EXIT2
);
len
=
write
(
fd1
,
writebuf
,
strlen
(
writebuf
));
len
=
write
(
fd1
,
writebuf
,
strlen
(
writebuf
));
ICUNIT_GOTO_EQUAL
(
len
,
strlen
(
writebuf
),
len
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
len
,
strlen
(
writebuf
),
len
,
EXIT2
);
...
@@ -238,7 +240,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -238,7 +240,7 @@ static VOID *PthreadF02(void *arg)
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT2
);
for
(
i
=
0
;
i
<
JFFS_MAX_CYCLES
;
i
++
)
{
for
(
i
=
0
;
i
<
jffsMaxCycles
;
i
++
)
{
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
...
@@ -257,8 +259,8 @@ static VOID *PthreadF02(void *arg)
...
@@ -257,8 +259,8 @@ static VOID *PthreadF02(void *arg)
ret
=
stat
(
pathname1
,
&
statfile
);
ret
=
stat
(
pathname1
,
&
statfile
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
//
5
* 1024 * 1024: filesize
//
1
* 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
5
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
1
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ret
=
close
(
fd
);
ret
=
close
(
fd
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
...
@@ -293,6 +295,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -293,6 +295,7 @@ static VOID *PthreadF03(void *arg)
INT32
i
=
0
;
INT32
i
=
0
;
INT32
j
=
0
;
INT32
j
=
0
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
k
=
JFFS_SHORT_ARRAY_LENGTH
;
INT32
jffsMaxCycles
=
1
;
// 1 means 1 * 1024 * 1024 byte size
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
CHAR
filebuf
[
FILE_BUF_SIZE
]
=
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
...
@@ -339,7 +342,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -339,7 +342,7 @@ static VOID *PthreadF03(void *arg)
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
"/006.txt"
);
strcat_s
(
pathname2
,
JFFS_STANDARD_NAME_LENGTH
,
"/006.txt"
);
fd1
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
fd1
=
open
(
pathname2
,
O_NONBLOCK
|
O_CREAT
|
O_RDWR
|
O_EXCL
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT2
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
1
,
JFFS_IS_ERROR
,
fd1
,
EXIT2
);
len
=
write
(
fd1
,
writebuf
,
strlen
(
writebuf
));
len
=
write
(
fd1
,
writebuf
,
strlen
(
writebuf
));
ICUNIT_GOTO_EQUAL
(
len
,
strlen
(
writebuf
),
len
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
len
,
strlen
(
writebuf
),
len
,
EXIT2
);
...
@@ -364,7 +367,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -364,7 +367,7 @@ static VOID *PthreadF03(void *arg)
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
off
=
lseek
(
fd
,
0
,
SEEK_SET
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
off
,
JFFS_NO_ERROR
,
off
,
EXIT2
);
for
(
i
=
0
;
i
<
JFFS_MAX_CYCLES
;
i
++
)
{
for
(
i
=
0
;
i
<
jffsMaxCycles
;
i
++
)
{
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ret
=
write
(
fd
,
bufW
,
strlen
(
bufW
));
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
BYTES_PER_MBYTE
,
ret
,
EXIT2
);
...
@@ -383,8 +386,8 @@ static VOID *PthreadF03(void *arg)
...
@@ -383,8 +386,8 @@ static VOID *PthreadF03(void *arg)
ret
=
stat
(
pathname1
,
&
statfile
);
ret
=
stat
(
pathname1
,
&
statfile
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
//
5
* 1024 * 1024: filesize
//
1
* 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
5
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
statfile
.
st_size
,
1
*
1024
*
1024
,
statfile
.
st_size
,
EXIT2
);
ret
=
close
(
fd
);
ret
=
close
(
fd
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT2
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_014.cpp
浏览文件 @
f523d7a9
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
*/
*/
#include "It_vfs_jffs.h"
#include "It_vfs_jffs.h"
static
INT32
g_testNum
=
2
0
;
static
INT32
g_testNum
=
2
;
static
VOID
*
PthreadF01
(
void
*
arg
)
static
VOID
*
PthreadF01
(
void
*
arg
)
{
{
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_015.cpp
浏览文件 @
f523d7a9
...
@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256
KB
INT32
bufWLen
=
4
*
BYTES_PER_KBYTE
;
// 4
KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
BYTES_PER_MBYTE
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
BYTES_PER_MBYTE
+
1
);
...
@@ -224,7 +224,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -224,7 +224,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256
KB
INT32
bufWLen
=
4
*
BYTES_PER_KBYTE
;
// 4
KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
BYTES_PER_MBYTE
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
BYTES_PER_MBYTE
+
1
);
...
@@ -400,7 +400,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -400,7 +400,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256
KB
INT32
bufWLen
=
4
*
BYTES_PER_KBYTE
;
// 4
KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
BYTES_PER_MBYTE
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
BYTES_PER_MBYTE
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_016.cpp
浏览文件 @
f523d7a9
...
@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
16
*
BYTES_PER_KBYTE
;
// 16 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -219,7 +219,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -219,7 +219,7 @@ static VOID *PthreadF02(void *arg)
DIR
*
dirbuf
[
100
]
=
{
NULL
};
DIR
*
dirbuf
[
100
]
=
{
NULL
};
struct
stat
buf1
=
{
0
};
struct
stat
buf1
=
{
0
};
struct
stat
buf2
=
{
0
};
struct
stat
buf2
=
{
0
};
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
16
*
BYTES_PER_KBYTE
;
// 16 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -390,7 +390,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -390,7 +390,7 @@ static VOID *PthreadF03(void *arg)
DIR
*
dirbuf
[
100
]
=
{
NULL
};
DIR
*
dirbuf
[
100
]
=
{
NULL
};
struct
stat
buf1
=
{
0
};
struct
stat
buf1
=
{
0
};
struct
stat
buf2
=
{
0
};
struct
stat
buf2
=
{
0
};
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
16
*
BYTES_PER_KBYTE
;
// 16 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_017.cpp
浏览文件 @
f523d7a9
...
@@ -47,7 +47,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -47,7 +47,7 @@ static VOID *PthreadF01(void *arg)
DIR
*
dirbuf
[
100
]
=
{
NULL
};
DIR
*
dirbuf
[
100
]
=
{
NULL
};
struct
stat
buf1
=
{
0
};
struct
stat
buf1
=
{
0
};
struct
stat
buf2
=
{
0
};
struct
stat
buf2
=
{
0
};
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
128
*
BYTES_PER_KBYTE
;
// 128 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -150,7 +150,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -150,7 +150,7 @@ static VOID *PthreadF02(void *arg)
DIR
*
dirbuf
[
100
]
=
{
NULL
};
DIR
*
dirbuf
[
100
]
=
{
NULL
};
struct
stat
buf1
=
{
0
};
struct
stat
buf1
=
{
0
};
struct
stat
buf2
=
{
0
};
struct
stat
buf2
=
{
0
};
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
128
*
BYTES_PER_KBYTE
;
// 128 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -256,7 +256,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -256,7 +256,7 @@ static VOID *PthreadF03(void *arg)
DIR
*
dirbuf
[
100
]
=
{
NULL
};
DIR
*
dirbuf
[
100
]
=
{
NULL
};
struct
stat
buf1
=
{
0
};
struct
stat
buf1
=
{
0
};
struct
stat
buf2
=
{
0
};
struct
stat
buf2
=
{
0
};
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
128
*
BYTES_PER_KBYTE
;
// 128 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_018.cpp
浏览文件 @
f523d7a9
...
@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -217,7 +217,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -217,7 +217,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -388,7 +388,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -388,7 +388,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_019.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_020.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_021.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -151,7 +151,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -151,7 +151,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -257,7 +257,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -257,7 +257,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_022.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -151,7 +151,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -151,7 +151,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_023.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -261,7 +261,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -261,7 +261,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_024.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
writebuf
[
20
]
=
"0000"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_025.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
ICUNIT_ASSERT_NOT_EQUAL_NULL
(
bufW
,
NULL
,
NULL
);
ICUNIT_ASSERT_NOT_EQUAL_NULL
(
bufW
,
NULL
,
NULL
);
...
@@ -107,7 +107,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -107,7 +107,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
ICUNIT_ASSERT_NOT_EQUAL_NULL
(
bufW
,
NULL
,
NULL
);
ICUNIT_ASSERT_NOT_EQUAL_NULL
(
bufW
,
NULL
,
NULL
);
...
@@ -170,7 +170,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -170,7 +170,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
ICUNIT_ASSERT_NOT_EQUAL_NULL
(
bufW
,
NULL
,
NULL
);
ICUNIT_ASSERT_NOT_EQUAL_NULL
(
bufW
,
NULL
,
NULL
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_036.cpp
浏览文件 @
f523d7a9
...
@@ -43,7 +43,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -43,7 +43,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -147,7 +147,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -147,7 +147,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -251,7 +251,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -251,7 +251,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_038.cpp
浏览文件 @
f523d7a9
...
@@ -43,7 +43,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -43,7 +43,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -148,7 +148,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -148,7 +148,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -253,7 +253,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -253,7 +253,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_039.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_040.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_041.cpp
浏览文件 @
f523d7a9
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_042.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_043.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_044.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_045.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_046.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_047.cpp
浏览文件 @
f523d7a9
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
...
@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
...
@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
...
@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
writebuf
[
20
]
=
"0123456789"
;
CHAR
*
bufW
=
NULL
;
CHAR
*
bufW
=
NULL
;
struct
stat
statbuf
;
struct
stat
statbuf
;
INT32
bufWLen
=
BYTES_PER_MBYTE
;
INT32
bufWLen
=
256
*
BYTES_PER_KBYTE
;
// 256 KB
flag
=
0
;
flag
=
0
;
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
bufW
=
(
CHAR
*
)
malloc
(
bufWLen
+
1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_052.cpp
浏览文件 @
f523d7a9
...
@@ -71,8 +71,6 @@ static VOID *MutiJffs05202(void *arg)
...
@@ -71,8 +71,6 @@ static VOID *MutiJffs05202(void *arg)
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_52"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_52"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
// file size: 1024, write size: 1024
// file size: 1024, write size: 1024
ret
=
JffsMultiWrite
(
pathname
,
1024
,
1024
,
O_RDWR
|
O_CREAT
,
JFFS_WR_TYPE_TEST
);
ret
=
JffsMultiWrite
(
pathname
,
1024
,
1024
,
O_RDWR
|
O_CREAT
,
JFFS_WR_TYPE_TEST
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT
);
ICUNIT_GOTO_EQUAL
(
ret
,
JFFS_NO_ERROR
,
ret
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_053.cpp
浏览文件 @
f523d7a9
...
@@ -68,7 +68,6 @@ static VOID *MutiJffs05302(void *arg)
...
@@ -68,7 +68,6 @@ static VOID *MutiJffs05302(void *arg)
dprintf
(
" start muti_jffs_053_02 1
\n
"
);
dprintf
(
" start muti_jffs_053_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_53"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_53"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
fd
=
open
(
pathname
,
O_RDONLY
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname
,
O_RDONLY
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_054.cpp
浏览文件 @
f523d7a9
...
@@ -69,7 +69,6 @@ static VOID *MutiJffs05402(void *arg)
...
@@ -69,7 +69,6 @@ static VOID *MutiJffs05402(void *arg)
dprintf
(
" start muti_jffs_054_02 1
\n
"
);
dprintf
(
" start muti_jffs_054_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_54"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_54"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
fd
=
open
(
pathname
,
O_WRONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname
,
O_WRONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_055.cpp
浏览文件 @
f523d7a9
...
@@ -68,7 +68,6 @@ static VOID *MutiJffs05502(void *arg)
...
@@ -68,7 +68,6 @@ static VOID *MutiJffs05502(void *arg)
dprintf
(
" start muti_jffs_055_02 1
\n
"
);
dprintf
(
" start muti_jffs_055_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_55"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_55"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
fd
=
open
(
pathname
,
O_WRONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname
,
O_WRONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_056.cpp
浏览文件 @
f523d7a9
...
@@ -69,7 +69,6 @@ static VOID *MutiJffs05602(void *arg)
...
@@ -69,7 +69,6 @@ static VOID *MutiJffs05602(void *arg)
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_56"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_56"
);
strcat_s
(
pathname1
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_56_rename"
);
strcat_s
(
pathname1
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_56_rename"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
rename
(
pathname
,
pathname1
);
rename
(
pathname
,
pathname1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_057.cpp
浏览文件 @
f523d7a9
...
@@ -66,7 +66,6 @@ static VOID *MutiJffs05702(void *arg)
...
@@ -66,7 +66,6 @@ static VOID *MutiJffs05702(void *arg)
dprintf
(
" start muti_jffs_057_02 1
\n
"
);
dprintf
(
" start muti_jffs_057_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_57"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_57"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
umount
(
pathname
);
umount
(
pathname
);
mount
(
JFFS_DEV_PATH0
,
JFFS_MAIN_DIR0
,
JFFS_FILESYS_TYPE
,
0
,
NULL
);
mount
(
JFFS_DEV_PATH0
,
JFFS_MAIN_DIR0
,
JFFS_FILESYS_TYPE
,
0
,
NULL
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_058.cpp
浏览文件 @
f523d7a9
...
@@ -66,7 +66,6 @@ static VOID *MutiJffs05802(void *arg)
...
@@ -66,7 +66,6 @@ static VOID *MutiJffs05802(void *arg)
CHAR
pathname
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
CHAR
pathname
[
JFFS_STANDARD_NAME_LENGTH
]
=
{
JFFS_PATH_NAME0
};
dprintf
(
" start muti_jffs_058_02 1
\n
"
);
dprintf
(
" start muti_jffs_058_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_58"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_58"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
// file size: 1024, write size: 16
// file size: 1024, write size: 16
ret
=
JffsMultiWrite
(
pathname
,
1024
,
16
,
O_RDWR
|
O_CREAT
,
JFFS_WR_TYPE_TEST
);
ret
=
JffsMultiWrite
(
pathname
,
1024
,
16
,
O_RDWR
|
O_CREAT
,
JFFS_WR_TYPE_TEST
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_059.cpp
浏览文件 @
f523d7a9
...
@@ -70,7 +70,6 @@ static VOID *MutiJffs05902(void *arg)
...
@@ -70,7 +70,6 @@ static VOID *MutiJffs05902(void *arg)
dprintf
(
" start muti_jffs_059_02 1
\n
"
);
dprintf
(
" start muti_jffs_059_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_59"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_59"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
fd
=
open
(
pathname
,
O_WRONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname
,
O_WRONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_060.cpp
浏览文件 @
f523d7a9
...
@@ -70,7 +70,6 @@ static VOID *MutiJffs06002(void *arg)
...
@@ -70,7 +70,6 @@ static VOID *MutiJffs06002(void *arg)
dprintf
(
" start muti_jffs_060_02 1
\n
"
);
dprintf
(
" start muti_jffs_060_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_60"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_60"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
fd
=
open
(
pathname
,
O_RDONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname
,
O_RDONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_061.cpp
浏览文件 @
f523d7a9
...
@@ -70,7 +70,6 @@ static VOID *MutiJffs06102(void *arg)
...
@@ -70,7 +70,6 @@ static VOID *MutiJffs06102(void *arg)
dprintf
(
" start muti_jffs_061_02 1
\n
"
);
dprintf
(
" start muti_jffs_061_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_61"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_61"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
fd
=
open
(
pathname
,
O_RDONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
fd
=
open
(
pathname
,
O_RDONLY
|
O_CREAT
,
HIGHEST_AUTHORITY
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
ICUNIT_GOTO_NOT_EQUAL
(
fd
,
JFFS_IS_ERROR
,
fd
,
EXIT
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_062.cpp
浏览文件 @
f523d7a9
...
@@ -71,7 +71,6 @@ static VOID *MutiJffs06202(void *arg)
...
@@ -71,7 +71,6 @@ static VOID *MutiJffs06202(void *arg)
dprintf
(
" start muti_jffs_062_02 1
\n
"
);
dprintf
(
" start muti_jffs_062_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_62"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_62"
);
strcat_s
(
pathname1
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_62_rename"
);
strcat_s
(
pathname1
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_62_rename"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
rename
(
pathname
,
pathname1
);
rename
(
pathname
,
pathname1
);
...
...
testsuites/unittest/fs/jffs/pressure/It_vfs_jffs_multipthread_063.cpp
浏览文件 @
f523d7a9
...
@@ -67,7 +67,6 @@ static VOID *MutiJffs06302(void *arg)
...
@@ -67,7 +67,6 @@ static VOID *MutiJffs06302(void *arg)
dprintf
(
" start muti_jffs_063_02 1
\n
"
);
dprintf
(
" start muti_jffs_063_02 1
\n
"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_63"
);
strcat_s
(
pathname
,
JFFS_STANDARD_NAME_LENGTH
,
"/test_63"
);
ICUNIT_GOTO_EQUAL
(
g_TestCnt
,
0
,
g_TestCnt
,
EXIT
);
umount
(
pathname
);
umount
(
pathname
);
...
...
testsuites/unittest/fs/jffs/vfs_jffs_test.cpp
浏览文件 @
f523d7a9
...
@@ -983,9 +983,19 @@ INT32 JffsStatfsPrintf(struct statfs buf)
...
@@ -983,9 +983,19 @@ INT32 JffsStatfsPrintf(struct statfs buf)
using
namespace
testing
::
ext
;
using
namespace
testing
::
ext
;
namespace
OHOS
{
namespace
OHOS
{
#if defined(LOSCFG_USER_TEST_PRESSURE)
pthread_mutexattr_t
mutex
;
#endif
class
VfsJffsTest
:
public
testing
::
Test
{
class
VfsJffsTest
:
public
testing
::
Test
{
public:
public:
static
void
SetUpTestCase
(
void
)
{}
static
void
SetUpTestCase
(
void
)
{
#if defined(LOSCFG_USER_TEST_PRESSURE)
pthread_mutexattr_settype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
pthread_mutex_init
(
&
g_jffs2GlobalLock1
,
&
mutex
);
pthread_mutex_init
(
&
g_jffs2GlobalLock2
,
&
mutex
);
#endif
}
static
void
TearDownTestCase
(
void
)
{}
static
void
TearDownTestCase
(
void
)
{}
};
};
#if defined(LOSCFG_USER_TEST_FULL)
#if defined(LOSCFG_USER_TEST_FULL)
...
@@ -7001,10 +7011,6 @@ HWTEST_F(VfsJffsTest, ItFsJffs535, TestSize.Level0)
...
@@ -7001,10 +7011,6 @@ HWTEST_F(VfsJffsTest, ItFsJffs535, TestSize.Level0)
#endif
#endif
#if defined(LOSCFG_USER_TEST_PRESSURE)
#if defined(LOSCFG_USER_TEST_PRESSURE)
pthreadMutexattrT
mutex
;
PthreadMutexattrSettype
(
&
mutex
,
PTHREAD_MUTEX_NORMAL
);
PthreadMutexInit
(
&
g_jffs2GlobalLock1
,
&
mutex
);
PthreadMutexInit
(
&
g_jffs2GlobalLock2
,
&
mutex
);
/* *
/* *
* @tc.name: ItFsJffsPRESSURE_001
* @tc.name: ItFsJffsPRESSURE_001
* @tc.desc: function for VfsJffsTest
* @tc.desc: function for VfsJffsTest
...
@@ -8481,17 +8487,6 @@ HWTEST_F(VfsJffsTest, ItFsJffsPerformance006, TestSize.Level0)
...
@@ -8481,17 +8487,6 @@ HWTEST_F(VfsJffsTest, ItFsJffsPerformance006, TestSize.Level0)
ItFsJffsPerformance006
();
ItFsJffsPerformance006
();
}
}
/* *
* @tc.name: ItFsJffsPERFORMANCE_007
* @tc.desc: function for VfsJffsTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F
(
VfsJffsTest
,
ItFsJffsPerformance007
,
TestSize
.
Level0
)
{
ItFsJffsPerformance007
();
}
/* *
/* *
* @tc.name: ItFsJffsPERFORMANCE_008
* @tc.name: ItFsJffsPERFORMANCE_008
* @tc.desc: function for VfsJffsTest
* @tc.desc: function for VfsJffsTest
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录