提交 f523d7a9 编写于 作者: O openharmony_ci 提交者: Gitee

!339 修复了文件系统中jffs的全量用例和压测用例中出现的问题

Merge pull request !339 from phchang/fixjffs
......@@ -73,4 +73,4 @@ LOSCFG_USER_TEST_SIGNAL = true
LOSCFG_USER_TEST_SYS = true
LOSCFG_USER_TEST_TIME_CLOCK = true
LOSCFG_USER_TEST_TIME_TIMER = true
LOSCFG_USER_TEST_UTIL = true
\ No newline at end of file
LOSCFG_USER_TEST_UTIL = true
......@@ -55,7 +55,7 @@ sources_smoke = [
"jffs/smoke/It_vfs_jffs_035.cpp",
"jffs/smoke/It_vfs_jffs_094.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_Dac_001.cpp",
]
......@@ -128,7 +128,7 @@ sources_pressure = [
"jffs/pressure/It_fs_jffs_pressure_053.cpp",
"jffs/pressure/It_fs_jffs_pressure_301.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_305.cpp",
"jffs/pressure/It_fs_jffs_pressure_306.cpp",
......@@ -289,7 +289,7 @@ sources_full = [
"jffs/full/It_vfs_jffs_048.cpp",
"jffs/full/It_vfs_jffs_049.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_055.cpp",
"jffs/full/It_vfs_jffs_056.cpp",
......@@ -837,4 +837,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
configs = [ "..:public_config_for_pressure" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
\ No newline at end of file
}
......@@ -137,7 +137,7 @@ constexpr int JFFS_MAX_DEF_BUF_NUM = 21;
constexpr int JFFS_FILE_LIMITTED_NUM = 200;
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_PRESSURE_W_R_SIZE1 = 1 * 1024 * 1024;
constexpr int JFFS_PRESSURE_W_R_SIZE2 = 5 * 1024 * 1024;
......
......@@ -40,7 +40,7 @@ static UINT32 Testcase(VOID)
CHAR *pfd = NULL;
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);
ICUNIT_GOTO_NOT_EQUAL(pfd, NULL, pfd, EXIT1);
......
......@@ -40,7 +40,7 @@ static UINT32 Testcase(VOID)
CHAR *pfd = NULL;
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);
ICUNIT_GOTO_NOT_EQUAL(pfd, NULL, pfd, EXIT1);
......
......@@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_NOT_EQUAL(fd1, -1, fd1, EXIT3);
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
ICUNIT_GOTO_EQUAL(len, 6, len, EXIT3);
......
......@@ -47,6 +47,7 @@ static UINT32 Testcase(VOID)
ret = mkdir(pathname1, HIGHEST_AUTHORITY);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT1);
strcat_s(pathname2, sizeof(pathname2), "/test");
strcat_s(pathname2, sizeof(pathname2), "/test");
ret = mkdir(pathname2, HIGHEST_AUTHORITY);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT2);
......
......@@ -48,7 +48,7 @@ static UINT32 Testcase(VOID)
fd1 = open(pathname1, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, HIGHEST_AUTHORITY);
ICUNIT_GOTO_NOT_EQUAL(fd1, -1, fd1, EXIT1);
strcat_s(pathname2, sizeof(pathname2), "/test");
strcat_s(pathname2, sizeof(pathname2), "/TEst");
fd2 = open(pathname2, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, HIGHEST_AUTHORITY);
ICUNIT_GOTO_NOT_EQUAL(fd2, -1, fd2, EXIT2);
......
......@@ -48,7 +48,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_NOT_EQUAL(pret, NULL, pret, 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(errno, ERANGE, errno, EXIT);
......
......@@ -105,12 +105,12 @@ static UINT32 Testcase(VOID)
memset(bufW2, 0, JFFS_SHORT_ARRAY_LENGTH + 1);
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_len = 0xffff;
g_jffsIov[0].iov_len = JFFS_SHORT_ARRAY_LENGTH;
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
ICUNIT_GOTO_EQUAL(lenV, 20, lenV, EXIT6); // compare ret lenV to target 20 lenV
......
......@@ -75,6 +75,8 @@ static UINT32 TestCase(VOID)
len = write(fd[index], bufW, strlen(bufW));
if (len <= 0) {
flag = 1;
ret = close(fd[index]);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
break;
}
......
......@@ -38,6 +38,7 @@ static UINT32 TestCase(VOID)
INT32 i = 0;
INT32 j = 0;
INT32 k = JFFS_SHORT_ARRAY_LENGTH;
INT32 jffsPressureCycles = 4; // write size 4 * 1024 * 1024
signed long long offset;
CHAR filebuf[FILE_BUF_SIZE] =
......@@ -101,11 +102,11 @@ static UINT32 TestCase(VOID)
fd = open(pathname1, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, HIGHEST_AUTHORITY);
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);
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));
printf("cnt=%d %d\n", i, j);
ICUNIT_GOTO_EQUAL(ret, BYTES_PER_MBYTE, ret, EXIT2);
......@@ -115,8 +116,8 @@ static UINT32 TestCase(VOID)
}
ret = stat(pathname1, &statfile);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
// file size: 10 * 1024 * 1024
ICUNIT_GOTO_EQUAL(statfile.st_size, 10 * 1024 * 1024, statfile.st_size, EXIT2);
// file size: 4 * 1024 * 1024
ICUNIT_GOTO_EQUAL(statfile.st_size, 4 * 1024 * 1024, statfile.st_size, EXIT2);
}
ret = close(fd);
......
......@@ -44,7 +44,7 @@ static UINT32 TestCase(VOID)
CHAR readbuf[JFFS_STANDARD_NAME_LENGTH] = "liteos";
CHAR bufname[JFFS_STANDARD_NAME_LENGTH] = "123";
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 pathname4[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)
for (i = 0; i < JFFS_SHORT_ARRAY_LENGTH; 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);
ret = mkdir(pathname3[i], HIGHEST_AUTHORITY);
......
......@@ -170,7 +170,7 @@ static VOID *PthreadF02(void *arg)
CHAR *bufR = NULL;
CHAR *bufW = NULL;
off_t off;
INT32 bufRSize = 6075; // 6075: read length
INT32 bufRSize = 6074; // 6074: read length
ret = pthread_mutex_lock(&g_jffs2GlobalLock1);
printf("[%d] Thread2 Start frist get lock\n", __LINE__);
......
......@@ -34,7 +34,7 @@
static VOID *PthreadF01(void *arg)
{
INT32 ret, len;
UINT32 writeSize = JFFS_PRESSURE_W_R_SIZE2;
UINT32 writeSize = JFFS_PRESSURE_W_R_SIZE1;
CHAR pathname1[JFFS_STANDARD_NAME_LENGTH] = { JFFS_PATH_NAME0 };
CHAR writebuf[JFFS_STANDARD_NAME_LENGTH] = "0123456789";
CHAR *writeBuf = NULL;
......@@ -66,7 +66,7 @@ static VOID *PthreadF01(void *arg)
printf("[%d]lseek64 off64:%lld Fd:%d \n", __LINE__, off64, g_jffsFd);
ICUNIT_GOTO_EQUAL(statbuf1.st_size, off64, statbuf1.st_size, EXIT1);
len = write(g_jffsFd, writebuf, strlen(writebuf));
len = write(g_jffsFd, writeBuf, strlen(writeBuf));
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(errno, ENOSPC, errno, EXIT1);
......
......@@ -98,8 +98,9 @@ static VOID *PthreadF01(void *arg)
testSpeed);
return NULL;
EXIT:
EXIT1:
close(g_jffsFd);
EXIT:
return NULL;
}
......
......@@ -33,7 +33,8 @@
static UINT32 TestCase(VOID)
{
INT32 ret, i;
INT32 ret;
INT32 i = 0;
INT32 scandirCount = 0;
CHAR pathname1[JFFS_STANDARD_NAME_LENGTH] = { JFFS_PATH_NAME0 };
CHAR pathname2[JFFS_NAME_LIMITTED_SIZE] = "";
......@@ -52,7 +53,6 @@ static UINT32 TestCase(VOID)
memset_s(pathname2, 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, "/");
// PATH_MAX test. The dirname has occupied 14 bytes.
while (i < 241) { // loop times: 241
i++;
......
......@@ -33,7 +33,8 @@
static UINT32 TestCase(VOID)
{
INT32 ret, i;
INT32 ret;
INT32 i = 0;
INT32 fd = -1;
INT32 scandirCount = 0;
CHAR pathname1[JFFS_STANDARD_NAME_LENGTH] = { JFFS_MAIN_DIR0 };
......@@ -82,7 +83,7 @@ static UINT32 TestCase(VOID)
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);
ICUNIT_GOTO_EQUAL(fd, -1, fd, EXIT1);
ICUNIT_GOTO_EQUAL(errno, ENAMETOOLONG, errno, EXIT2);
ICUNIT_GOTO_EQUAL(errno, EINVAL, errno, EXIT2);
ret = chdir("/");
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
......
......@@ -40,6 +40,7 @@ static VOID *PthreadF01(void *arg)
INT32 i = 0;
INT32 j = 0;
INT32 k = JFFS_SHORT_ARRAY_LENGTH;
INT32 jffsMaxCycles = 1; // 1 means 1 * 1024 * 1024 byte size
CHAR filebuf[FILE_BUF_SIZE] =
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
......@@ -87,7 +88,7 @@ static VOID *PthreadF01(void *arg)
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT2);
ICUNIT_GOTO_NOT_EQUAL(fd1, JFFS_IS_ERROR, fd1, EXIT2);
len = write(fd1, writebuf, strlen(writebuf));
ICUNIT_GOTO_EQUAL(len, strlen(writebuf), len, EXIT2);
......@@ -112,7 +113,7 @@ static VOID *PthreadF01(void *arg)
off = lseek(fd, 0, SEEK_SET);
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));
ICUNIT_GOTO_EQUAL(ret, BYTES_PER_MBYTE, ret, EXIT2);
......@@ -131,8 +132,8 @@ static VOID *PthreadF01(void *arg)
ret = stat(pathname1, &statfile);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
// 5 * 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL(statfile.st_size, 5 * 1024 * 1024, statfile.st_size, EXIT2);
// 1 * 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL(statfile.st_size, 1 * 1024 * 1024, statfile.st_size, EXIT2);
ret = close(fd);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
......@@ -167,6 +168,7 @@ static VOID *PthreadF02(void *arg)
INT32 i = 0;
INT32 j = 0;
INT32 k = JFFS_SHORT_ARRAY_LENGTH;
INT32 jffsMaxCycles = 1; // 1 means 1 * 1024 * 1024 byte size
CHAR filebuf[FILE_BUF_SIZE] =
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
......@@ -213,7 +215,7 @@ static VOID *PthreadF02(void *arg)
strcat_s(pathname2, JFFS_STANDARD_NAME_LENGTH, "/005.txt");
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(fd1, JFFS_IS_ERROR, fd1, EXIT2);
len = write(fd1, writebuf, strlen(writebuf));
ICUNIT_GOTO_EQUAL(len, strlen(writebuf), len, EXIT2);
......@@ -238,7 +240,7 @@ static VOID *PthreadF02(void *arg)
off = lseek(fd, 0, SEEK_SET);
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));
ICUNIT_GOTO_EQUAL(ret, BYTES_PER_MBYTE, ret, EXIT2);
......@@ -257,8 +259,8 @@ static VOID *PthreadF02(void *arg)
ret = stat(pathname1, &statfile);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
// 5 * 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL(statfile.st_size, 5 * 1024 * 1024, statfile.st_size, EXIT2);
// 1 * 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL(statfile.st_size, 1 * 1024 * 1024, statfile.st_size, EXIT2);
ret = close(fd);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
......@@ -293,6 +295,7 @@ static VOID *PthreadF03(void *arg)
INT32 i = 0;
INT32 j = 0;
INT32 k = JFFS_SHORT_ARRAY_LENGTH;
INT32 jffsMaxCycles = 1; // 1 means 1 * 1024 * 1024 byte size
CHAR filebuf[FILE_BUF_SIZE] =
"abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
......@@ -339,7 +342,7 @@ static VOID *PthreadF03(void *arg)
strcat_s(pathname2, JFFS_STANDARD_NAME_LENGTH, "/006.txt");
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(fd1, JFFS_IS_ERROR, fd1, EXIT2);
len = write(fd1, writebuf, strlen(writebuf));
ICUNIT_GOTO_EQUAL(len, strlen(writebuf), len, EXIT2);
......@@ -364,7 +367,7 @@ static VOID *PthreadF03(void *arg)
off = lseek(fd, 0, SEEK_SET);
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));
ICUNIT_GOTO_EQUAL(ret, BYTES_PER_MBYTE, ret, EXIT2);
......@@ -383,8 +386,8 @@ static VOID *PthreadF03(void *arg)
ret = stat(pathname1, &statfile);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
// 5 * 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL(statfile.st_size, 5 * 1024 * 1024, statfile.st_size, EXIT2);
// 1 * 1024 * 1024: filesize
ICUNIT_GOTO_EQUAL(statfile.st_size, 1 * 1024 * 1024, statfile.st_size, EXIT2);
ret = close(fd);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT2);
......
......@@ -30,7 +30,7 @@
*/
#include "It_vfs_jffs.h"
static INT32 g_testNum = 20;
static INT32 g_testNum = 2;
static VOID *PthreadF01(void *arg)
{
......
......@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
INT32 bufWLen = 4 * BYTES_PER_KBYTE; // 4 KB
flag = 0;
bufW = (CHAR *)malloc(BYTES_PER_MBYTE + 1);
......@@ -224,7 +224,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
INT32 bufWLen = 4 * BYTES_PER_KBYTE; // 4 KB
flag = 0;
bufW = (CHAR *)malloc(BYTES_PER_MBYTE + 1);
......@@ -400,7 +400,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
INT32 bufWLen = 4 * BYTES_PER_KBYTE; // 4 KB
flag = 0;
bufW = (CHAR *)malloc(BYTES_PER_MBYTE + 1);
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 16 * BYTES_PER_KBYTE; // 16 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -219,7 +219,7 @@ static VOID *PthreadF02(void *arg)
DIR *dirbuf[100] = {NULL};
struct stat buf1 = { 0 };
struct stat buf2 = { 0 };
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 16 * BYTES_PER_KBYTE; // 16 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -390,7 +390,7 @@ static VOID *PthreadF03(void *arg)
DIR *dirbuf[100] = {NULL};
struct stat buf1 = { 0 };
struct stat buf2 = { 0 };
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 16 * BYTES_PER_KBYTE; // 16 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -47,7 +47,7 @@ static VOID *PthreadF01(void *arg)
DIR *dirbuf[100] = {NULL};
struct stat buf1 = { 0 };
struct stat buf2 = { 0 };
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 128 * BYTES_PER_KBYTE; // 128 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -150,7 +150,7 @@ static VOID *PthreadF02(void *arg)
DIR *dirbuf[100] = {NULL};
struct stat buf1 = { 0 };
struct stat buf2 = { 0 };
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 128 * BYTES_PER_KBYTE; // 128 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -256,7 +256,7 @@ static VOID *PthreadF03(void *arg)
DIR *dirbuf[100] = {NULL};
struct stat buf1 = { 0 };
struct stat buf2 = { 0 };
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 128 * BYTES_PER_KBYTE; // 128 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -217,7 +217,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -388,7 +388,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -151,7 +151,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -257,7 +257,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -151,7 +151,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -261,7 +261,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -153,7 +153,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -260,7 +260,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0000";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
bufW = (CHAR *)malloc(bufWLen + 1);
ICUNIT_ASSERT_NOT_EQUAL_NULL(bufW, NULL, NULL);
......@@ -107,7 +107,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
bufW = (CHAR *)malloc(bufWLen + 1);
ICUNIT_ASSERT_NOT_EQUAL_NULL(bufW, NULL, NULL);
......@@ -170,7 +170,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
bufW = (CHAR *)malloc(bufWLen + 1);
ICUNIT_ASSERT_NOT_EQUAL_NULL(bufW, NULL, NULL);
......
......@@ -43,7 +43,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -147,7 +147,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -251,7 +251,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -43,7 +43,7 @@ static VOID *PthreadF01(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -148,7 +148,7 @@ static VOID *PthreadF02(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -253,7 +253,7 @@ static VOID *PthreadF03(void *arg)
"456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123456789abcedfgh"
"ij9876543210abcdeabcde0123456789abcedfghij9876543210lalalalalalalala";
CHAR *bufW = NULL;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -44,7 +44,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -45,7 +45,7 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......@@ -270,7 +270,7 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufW = NULL;
struct stat statbuf;
INT32 bufWLen = BYTES_PER_MBYTE;
INT32 bufWLen = 256 * BYTES_PER_KBYTE; // 256 KB
flag = 0;
bufW = (CHAR *)malloc(bufWLen + 1);
......
......@@ -71,8 +71,6 @@ static VOID *MutiJffs05202(void *arg)
strcat_s(pathname, JFFS_STANDARD_NAME_LENGTH, "/test_52");
ICUNIT_GOTO_EQUAL(g_TestCnt, 0, g_TestCnt, EXIT);
// file size: 1024, write size: 1024
ret = JffsMultiWrite(pathname, 1024, 1024, O_RDWR | O_CREAT, JFFS_WR_TYPE_TEST);
ICUNIT_GOTO_EQUAL(ret, JFFS_NO_ERROR, ret, EXIT);
......
......@@ -68,7 +68,6 @@ static VOID *MutiJffs05302(void *arg)
dprintf(" start muti_jffs_053_02 1 \n");
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT);
......
......@@ -69,7 +69,6 @@ static VOID *MutiJffs05402(void *arg)
dprintf(" start muti_jffs_054_02 1 \n");
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT);
......
......@@ -68,7 +68,6 @@ static VOID *MutiJffs05502(void *arg)
dprintf(" start muti_jffs_055_02 1 \n");
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT);
......
......@@ -69,7 +69,6 @@ static VOID *MutiJffs05602(void *arg)
strcat_s(pathname, JFFS_STANDARD_NAME_LENGTH, "/test_56");
strcat_s(pathname1, JFFS_STANDARD_NAME_LENGTH, "/test_56_rename");
ICUNIT_GOTO_EQUAL(g_TestCnt, 0, g_TestCnt, EXIT);
rename(pathname, pathname1);
......
......@@ -66,7 +66,6 @@ static VOID *MutiJffs05702(void *arg)
dprintf(" start muti_jffs_057_02 1 \n");
strcat_s(pathname, JFFS_STANDARD_NAME_LENGTH, "/test_57");
ICUNIT_GOTO_EQUAL(g_TestCnt, 0, g_TestCnt, EXIT);
umount(pathname);
mount(JFFS_DEV_PATH0, JFFS_MAIN_DIR0, JFFS_FILESYS_TYPE, 0, NULL);
......
......@@ -66,7 +66,6 @@ static VOID *MutiJffs05802(void *arg)
CHAR pathname[JFFS_STANDARD_NAME_LENGTH] = { JFFS_PATH_NAME0 };
dprintf(" start muti_jffs_058_02 1 \n");
strcat_s(pathname, JFFS_STANDARD_NAME_LENGTH, "/test_58");
ICUNIT_GOTO_EQUAL(g_TestCnt, 0, g_TestCnt, EXIT);
// file size: 1024, write size: 16
ret = JffsMultiWrite(pathname, 1024, 16, O_RDWR | O_CREAT, JFFS_WR_TYPE_TEST);
......
......@@ -70,7 +70,6 @@ static VOID *MutiJffs05902(void *arg)
dprintf(" start muti_jffs_059_02 1 \n");
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT);
......
......@@ -70,7 +70,6 @@ static VOID *MutiJffs06002(void *arg)
dprintf(" start muti_jffs_060_02 1 \n");
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT);
......
......@@ -70,7 +70,6 @@ static VOID *MutiJffs06102(void *arg)
dprintf(" start muti_jffs_061_02 1 \n");
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);
ICUNIT_GOTO_NOT_EQUAL(fd, JFFS_IS_ERROR, fd, EXIT);
......
......@@ -71,7 +71,6 @@ static VOID *MutiJffs06202(void *arg)
dprintf(" start muti_jffs_062_02 1 \n");
strcat_s(pathname, JFFS_STANDARD_NAME_LENGTH, "/test_62");
strcat_s(pathname1, JFFS_STANDARD_NAME_LENGTH, "/test_62_rename");
ICUNIT_GOTO_EQUAL(g_TestCnt, 0, g_TestCnt, EXIT);
rename(pathname, pathname1);
......
......@@ -67,7 +67,6 @@ static VOID *MutiJffs06302(void *arg)
dprintf(" start muti_jffs_063_02 1 \n");
strcat_s(pathname, JFFS_STANDARD_NAME_LENGTH, "/test_63");
ICUNIT_GOTO_EQUAL(g_TestCnt, 0, g_TestCnt, EXIT);
umount(pathname);
......
......@@ -983,9 +983,19 @@ INT32 JffsStatfsPrintf(struct statfs buf)
using namespace testing::ext;
namespace OHOS {
#if defined(LOSCFG_USER_TEST_PRESSURE)
pthread_mutexattr_t mutex;
#endif
class VfsJffsTest : public testing::Test {
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) {}
};
#if defined(LOSCFG_USER_TEST_FULL)
......@@ -7001,10 +7011,6 @@ HWTEST_F(VfsJffsTest, ItFsJffs535, TestSize.Level0)
#endif
#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.desc: function for VfsJffsTest
......@@ -8481,17 +8487,6 @@ HWTEST_F(VfsJffsTest, ItFsJffsPerformance006, TestSize.Level0)
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.desc: function for VfsJffsTest
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册