“d45563684b1bf73d5435621de3bd5a430cbaae1d”上不存在“...5-taos-tools/git@gitcode.net:taosdata/tdengine.git”
提交 a8384b5d 编写于 作者: F Far

fix: 修复了内核的VFAT测试用例

修复内容包括如下:
1. 将memset_s中buffer的大小设置正确;
2. 将用例文件夹名由vfat2修改为vfat;
3. 修复了vfat用例在SetUpTestcase和TearDownTestCase;
4. 全局变量g_fatFilesystem在初始化时设置为2(即FAT32);

Close #I3XF3R
Signed-off-by: NFar <yesiyuan2@huawei.com>
上级 5db839ac
......@@ -81,13 +81,13 @@ group("unittest") {
}
if (LOSCFG_USER_TEST_FS_VFAT == true) {
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest_door" ]
deps += [ "fs/vfat:liteos_a_fs_vfat_unittest_door" ]
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest" ]
deps += [ "fs/vfat:liteos_a_fs_vfat_unittest" ]
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest_pressure" ]
deps += [ "fs/vfat:liteos_a_fs_vfat_unittest_pressure" ]
}
}
if (LOSCFG_USER_TEST_FS_PROC == true) {
......
......@@ -34,7 +34,7 @@ common_include_dirs = [
"//third_party/googletest/googletest/include",
"../../common/include",
"//kernel/liteos_a/testsuites/unittest/fs/vfs",
"//kernel/liteos_a/testsuites/unittest/fs/vfat2",
"//kernel/liteos_a/testsuites/unittest/fs/vfat",
]
sources_entry = [
......
......@@ -33,7 +33,6 @@
#define IT_VFS_FAT_H
#include "osTest.h"
#include "syslog.h"
#include "sys/uio.h"
#include "utime.h"
#include <sys/types.h>
......@@ -265,6 +264,8 @@ VOID ItFsFat903(VOID);
VOID ItFsFat904(VOID);
VOID ItFsFat909(VOID);
#endif
#if defined(LOSCFG_USER_TEST_PRESSURE)
VOID ItFsFatMutipthread003(VOID);
VOID ItFsFatMutipthread004(VOID);
......@@ -334,5 +335,3 @@ VOID ItFsFatPerformance007(VOID);
VOID ItFsFatPerformance008(VOID);
#endif
#endif
\ No newline at end of file
......@@ -788,26 +788,20 @@ public:
{
INT32 ret = 0;
sleep(3); // 3s
if (ret != 0)
perror("format sd card");
return;
ret = mkdir("/vs/", S_IRWXU | S_IRWXG | S_IRWXO);
if (ret != 0) {
perror("mkdir mount dir");
return;
ret = mkdir(FAT_MOUNT_DIR, S_IRWXU | S_IRWXG | S_IRWXO);
if (ret != 0) {
perror("mkdir mount dir");
return;
}
ret = mount(FAT_DEV_PATH, FAT_MOUNT_DIR, FAT_FILESYS_TYPE, 0, nullptr);
if (ret != 0) {
perror("mount sd card");
return;
}
}
ret = mkdir(FAT_MOUNT_DIR, S_IRWXU | S_IRWXG | S_IRWXO);
if (ret != 0) {
perror("mkdir mount dir");
}
g_fatFilesystem = 2;
ret = mount(FAT_DEV_PATH, FAT_MOUNT_DIR, FAT_FILESYS_TYPE, 0, nullptr);
ASSERT_EQ(0, ret);
}
static void TearDownTestCase(void)
{
......@@ -815,6 +809,13 @@ public:
}
};
#if defined(LOSCFG_USER_TEST_SMOKE)
HWTEST_F(VfsFatTest, ItFsFat026, TestSize.Level0)
{
ItFsFat026();
}
#endif
#if defined(LOSCFG_USER_TEST_FULL)
HWTEST_F(VfsFatTest, ItFsFat066, TestSize.Level0)
{
......@@ -1146,7 +1147,8 @@ HWTEST_F(VfsFatTest, ItFsFat909, TestSize.Level0)
ItFsFat909(); // plug and unplug during writing or reading
}
#endif
#endif // LOSCFG_USER_TEST_FULL
#if defined(LOSCFG_USER_TEST_PRESSURE)
HWTEST_F(VfsFatTest, ItFsFatPressure040, TestSize.Level0)
{
......@@ -1460,11 +1462,5 @@ HWTEST_F(VfsFatTest, ItFsFatPerformance008, TestSize.Level0)
ItFsFatPerformance008(); // fix write and read for three pthread
}
#endif
#if defined(LOSCFG_USER_TEST_SMOKE)
HWTEST_F(VfsFatTest, ItFsFat026, TestSize.Level0)
{
ItFsFat026(); // statfs Unsupport
}
#endif
#endif // LOSCFG_USER_TEST_PRESSURE
} // namespace OHOS
......@@ -53,7 +53,7 @@ static const int CLUSTER_SIZE64 = 64;
static const int CLUSTER_SIZE128 = 128;
static const int CLUSTER_SIZE255 = 255;
static const int CLUSTER_SIZE256 = 256;
static const int SECTOR_SIZE = 128;
static const int SECTOR_SIZE = 512;
static UINT32 TestCase(VOID)
{
......
......@@ -130,10 +130,6 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
FatStatfsPrintf(buf1);
ICUNIT_GOTO_EQUAL(ret, FAT_IS_ERROR, ret, EXIT1);
ICUNIT_GOTO_EQUAL(ret, FAT_IS_ERROR, ret, EXIT1);
ret = statfs(pathname1, &buf2);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
FatStatfsPrintf(buf2);
......
......@@ -62,7 +62,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_NOT_EQUAL(writebuf, NULL, writebuf, EXIT);
(void)memset_s(writebuf, size + 1, 0, size + 1);
ret = memset_s(writebuf, size + 1, 0x61, size);
ICUNIT_GOTO_NOT_EQUAL(ret, 0, ret, EXIT);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
fd = open(pathname1, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO);
ICUNIT_GOTO_NOT_EQUAL(fd, FAT_IS_ERROR, fd, EXIT1);
......
......@@ -113,7 +113,7 @@ static UINT32 TestCase(VOID)
ret = write(g_fatFd, bufWrite, strlen(bufWrite));
if (ret <= 0) {
if (g_testCount < (4 * BYTES_PER_KBYTES / 8)) { // 4 * BYTES_PER_KBYTES MB/GB, 8MB per write
printf("The biggest file size is smaller than the 4GB");
printf("The biggest file size is smaller than the 4GB\n");
goto EXIT2;
}
printf("The cycle count = :%d,the file size = :%dMB,= :%0.3lfGB\n", g_testCount,
......
......@@ -62,8 +62,8 @@ static UINT32 TestCase(VOID)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0,
BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // 1M * BYTES_PER_KBYTES * 4 = 4GB
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // 256 * BYTES_PER_KBYTES * 4 = 1MB
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(pathname, S_IRWXU | S_IRWXG | S_IRWXO);
......
......@@ -65,7 +65,7 @@ static UINT32 TestCase(VOID)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB // 1M
for (i = 0; i < 200 * 4; i++) { // append 200 * 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(pathname0, S_IRWXU | S_IRWXG | S_IRWXO);
......
......@@ -75,7 +75,7 @@ static UINT32 TestCase(VOID)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 200 * 4; i++) { // append 200 * 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(pathname1, S_IRWXU | S_IRWXG | S_IRWXO);
......
......@@ -64,7 +64,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 4; i++) { // append 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(bufname, S_IRWXU | S_IRWXG | S_IRWXO);
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 4; i++) { // append 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(bufname, S_IRWXU | S_IRWXG | S_IRWXO);
......@@ -247,7 +247,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 4; i++) { // append 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(bufname, S_IRWXU | S_IRWXG | S_IRWXO);
......
......@@ -50,7 +50,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 4; i++) { // append 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(bufname, S_IRWXU | S_IRWXG | S_IRWXO);
......@@ -139,7 +139,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 4; i++) { // append 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(bufname, S_IRWXU | S_IRWXG | S_IRWXO);
......@@ -228,7 +228,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < 4; i++) { // append 4 times to 1M
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
ret = mkdir(bufname, S_IRWXU | S_IRWXG | S_IRWXO);
......
......@@ -77,23 +77,23 @@ static UINT32 TestCase(VOID)
(void)memset_s(bufWrite2, 16 * BYTES_PER_KBYTES + 1, 0, 16 * BYTES_PER_KBYTES + 1); // 16 kb
for (j = 0; j < 16; j++) { // loop 16 times
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES + 1, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES + 1, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES + 1, filebuf); // 16kb
(void)strcat_s(bufWrite2, 16 * BYTES_PER_KBYTES + 1, filebuf); // 16kb
}
for (i = 0; i < 4; i++) { // loop 4 times
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES + 1, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES + 1, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES + 1, bufWrite2); // 256kb
(void)strcat_s(bufWrite1, 256 * BYTES_PER_KBYTES + 1, bufWrite2); // 256kb
}
for (i = 0; i < 5; i++) { // loop 5 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 5 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 5 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 5 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 5 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
free(bufWrite2);
......
......@@ -214,8 +214,8 @@ static VOID *PthreadF02(void *arg)
}
for (i = 0; i < 10; i++) { // loop 10 times
(void)strcat_s(bufWrite, 10 * BYTES_PER_MBYTES, bufWrite1); // 10 * BYTES_PER_MBYTES = 10MB
(void)strcat_s(bufWrite, 10 * BYTES_PER_MBYTES, bufWrite1); // 10 * BYTES_PER_MBYTES = 10MB
(void)strcat_s(bufWrite, 10 * BYTES_PER_MBYTES + 1, bufWrite1); // 10 * BYTES_PER_MBYTES = 10MB
(void)strcat_s(bufWrite, 10 * BYTES_PER_MBYTES + 1, bufWrite1); // 10 * BYTES_PER_MBYTES = 10MB
}
free(bufWrite1);
free(bufWrite2);
......@@ -331,11 +331,11 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT2);
ret = PosixPthreadDestroy(&attr1, newThread1);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT2);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
printf("\tg_fatFlag=:%d\t", g_fatFlag);
}
printf("\n");
ICUNIT_GOTO_EQUAL(g_fatFlag, FAT_PRESSURE_CYCLES, g_fatFlag, EXIT2);
ICUNIT_GOTO_EQUAL(g_fatFlag, FAT_PRESSURE_CYCLES, g_fatFlag, EXIT);
dir = opendir(FAT_PATH_NAME);
ICUNIT_GOTO_NOT_EQUAL(dir, NULL, dir, EXIT3);
......
......@@ -212,6 +212,7 @@ static VOID *PthreadF02(void *arg)
(void)strcat_s(bufWrite1, 10 * BYTES_PER_MBYTES + 1, bufWrite2); // 10 mb
(void)strcat_s(bufWrite1, 10 * BYTES_PER_MBYTES + 1, bufWrite2); // 10 mb
(void)strcat_s(bufWrite1, 10 * BYTES_PER_MBYTES + 1, bufWrite2); // 10 mb
(void)strcat_s(bufWrite1, 10 * BYTES_PER_MBYTES + 1, bufWrite2); // 10 mb
}
free(bufWrite4);
......@@ -357,7 +358,6 @@ static UINT32 TestCase(VOID)
printf("\tg_fatFlag=:%d\t", g_fatFlag);
}
printf("\n");
ICUNIT_GOTO_EQUAL(g_fatFlag, FAT_PRESSURE_CYCLES, g_fatFlag, EXIT2);
dir = opendir(FAT_PATH_NAME);
ICUNIT_GOTO_NOT_EQUAL(dir, NULL, dir, EXIT3);
......@@ -368,6 +368,8 @@ static UINT32 TestCase(VOID)
ret = closedir(dir);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT3);
ICUNIT_GOTO_EQUAL(g_fatFlag, FAT_PRESSURE_CYCLES, g_fatFlag, EXIT);
ret = rmdir(FAT_PATH_NAME);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT);
......
......@@ -75,9 +75,9 @@ static UINT32 TestCase(VOID)
for (i = 0; i < 50; i++) { // loop 50 times
(void)memset_s(bufname, FAT_SHORT_ARRAY_LENGTH, 0, FAT_SHORT_ARRAY_LENGTH);
(void)memset_s(pathname2[i], FAT_STANDARD_NAME_LENGTH, 0, FAT_SHORT_ARRAY_LENGTH);
(void)memset_s(pathname2[i], FAT_STANDARD_NAME_LENGTH, 0, FAT_STANDARD_NAME_LENGTH);
(void)snprintf_s(bufname, FAT_SHORT_ARRAY_LENGTH, FAT_SHORT_ARRAY_LENGTH, "/test%d", i);
FatStrcat2(pathname2[i], bufname, strlen(bufname));
FatStrcat2(pathname2[i], bufname, FAT_STANDARD_NAME_LENGTH);
ret = mkdir(pathname2[i], S_IRWXU | S_IRWXG | S_IRWXO);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT2);
......
......@@ -51,7 +51,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -186,7 +186,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -320,7 +320,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -52,7 +52,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
printf("In %s,line %d\n", __FUNCTION__, __LINE__);
index = 0;
......@@ -179,7 +179,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
printf("In %s,line %d\n", __FUNCTION__, __LINE__);
......@@ -307,7 +307,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
printf("In %s,line %d\n", __FUNCTION__, __LINE__);
......
......@@ -51,7 +51,7 @@ static VOID *PthreadF01(void *arg)
printf("pthread_f01 is excecuting\n");
bufWrite = (CHAR *)malloc(4 * BYTES_PER_MBYTES + 1); // 4MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite, NULL, 0, EXIT1);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
(void)memset_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
bufWrite1 = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite1, NULL, 0, EXIT2);
......@@ -76,8 +76,8 @@ static VOID *PthreadF01(void *arg)
}
for (i = 0; i < 2; i++) { // loop 2 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
......@@ -157,7 +157,7 @@ static VOID *PthreadF02(void *arg)
printf("pthread_f02 is excecuting\n");
bufWrite = (CHAR *)malloc(4 * BYTES_PER_MBYTES + 1); // 4MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite, NULL, 0, EXIT1);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
(void)memset_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
bufWrite1 = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite1, NULL, 0, EXIT2);
......@@ -182,8 +182,8 @@ static VOID *PthreadF02(void *arg)
}
for (i = 0; i < 2; i++) { // loop 2 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
......@@ -263,7 +263,7 @@ static VOID *PthreadF03(void *arg)
printf("pthread_f03 is excecuting\n");
bufWrite = (CHAR *)malloc(4 * BYTES_PER_MBYTES + 1); // 4MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite, NULL, 0, EXIT1);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
(void)memset_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
bufWrite1 = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite1, NULL, 0, EXIT2);
......@@ -288,8 +288,8 @@ static VOID *PthreadF03(void *arg)
}
for (i = 0; i < 2; i++) { // loop 2 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
......
......@@ -53,7 +53,7 @@ static VOID *PthreadF01(void *arg)
bufWrite = (CHAR *)malloc(4 * BYTES_PER_MBYTES + 1); // 4MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite, NULL, 0, EXIT1);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
(void)memset_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
bufWrite1 = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite1, NULL, 0, EXIT2);
......@@ -78,8 +78,8 @@ static VOID *PthreadF01(void *arg)
}
for (i = 0; i < 2; i++) { // loop 2 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
......@@ -239,7 +239,7 @@ static VOID *PthreadF02(void *arg)
bufWrite = (CHAR *)malloc(4 * BYTES_PER_MBYTES + 1); // 4MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite, NULL, 0, EXIT1);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
(void)memset_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
bufWrite1 = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite1, NULL, 0, EXIT2);
......@@ -264,8 +264,8 @@ static VOID *PthreadF02(void *arg)
}
for (i = 0; i < 2; i++) { // loop 2 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
......@@ -425,7 +425,7 @@ static VOID *PthreadF03(void *arg)
bufWrite = (CHAR *)malloc(4 * BYTES_PER_MBYTES + 1); // 4MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite, NULL, 0, EXIT1);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
(void)memset_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, 0, 4 * BYTES_PER_MBYTES + 1); // 4mb
bufWrite1 = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_GOTO_NOT_EQUAL(bufWrite1, NULL, 0, EXIT2);
......@@ -450,8 +450,8 @@ static VOID *PthreadF03(void *arg)
}
for (i = 0; i < 2; i++) { // loop 2 times
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
(void)strcat_s(bufWrite, 4 * BYTES_PER_MBYTES + 1, bufWrite1);
}
free(bufWrite1);
......
......@@ -55,7 +55,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -191,7 +191,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -327,7 +327,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
for (i = 0; i < FAT_MAX_CYCLES; i++) { // 100 个文件
......@@ -134,7 +134,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
for (i = 0; i < FAT_MAX_CYCLES; i++) { // 100 个文件
......@@ -219,7 +219,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
for (i = 0; i < FAT_MAX_CYCLES; i++) { // 100 个文件
......
......@@ -53,7 +53,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -194,7 +194,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -336,7 +336,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -56,7 +56,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -218,7 +218,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -378,7 +378,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -55,7 +55,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -215,7 +215,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -376,7 +376,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -54,7 +54,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -226,7 +226,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -398,7 +398,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -147,7 +147,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -247,7 +247,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -54,7 +54,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -219,7 +219,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -385,7 +385,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -155,7 +155,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -261,7 +261,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -157,7 +157,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -156,7 +156,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -262,7 +262,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -155,7 +155,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -261,7 +261,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -133,7 +133,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -218,7 +218,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -133,7 +133,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -218,7 +218,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -333,7 +333,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // there 3 threads
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // there 3 threads
ret = rmdir(bufname3);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT);
......
......@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -132,7 +132,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -216,7 +216,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -332,7 +332,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // there 3 threads
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // there 3 threads
ret = rmdir(bufname3);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT);
......
......@@ -48,7 +48,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -132,7 +132,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -217,7 +217,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -333,7 +333,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // there 3 threads
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // there 3 threads
ret = rmdir(bufname3);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT);
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -148,7 +148,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -247,7 +247,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -148,7 +148,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -249,7 +249,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -149,7 +149,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -249,7 +249,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -150,7 +150,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -253,7 +253,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -395,7 +395,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
}
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // there 3 threads
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // there 3 threads
ret = rmdir(bufname);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT);
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -33,7 +33,7 @@
static VOID *PthreadF01(void *arg)
{
INT32 i, j, ret, len, flag, index;
INT32 i, j, ret, len, index;
INT32 fd[100] = {};
CHAR pathname[FAT_STANDARD_NAME_LENGTH] = "";
CHAR readbuf[FAT_STANDARD_NAME_LENGTH] = "";
......@@ -43,13 +43,12 @@ static VOID *PthreadF01(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufWrite = nullptr;
flag = 0;
bufWrite = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_ASSERT_NOT_EQUAL_NULL(bufWrite, NULL, NULL);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -58,35 +57,27 @@ static VOID *PthreadF01(void *arg)
index);
fd[index] = open(pathname, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO);
if (fd[index] == -1) {
break;
index--;
ICUNIT_GOTO_NOT_EQUAL(fd[index], -1, fd[index], EXIT1);
}
switch (index % 3) { // mod 3
case 0:
for (j = 0; j < FAT_MAX_CYCLES; j++) { // 写满100M
len = write(fd[index], bufWrite, strlen(bufWrite));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(bufWrite), len, EXIT1);
}
LosTaskDelay(3); // delay 3 s
break;
case 1:
for (j = 0; j < FAT_MIDDLE_CYCLES; j++) { // 写满10M
len = write(fd[index], bufWrite, strlen(bufWrite));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(bufWrite), len, EXIT1);
}
LosTaskDelay(5); // delay 5 s
break;
case 2: // the 2 nd case
len = write(fd[index], writebuf, strlen(writebuf));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(writebuf), len, EXIT1);
LosTaskDelay(7); // delay 7 s
break;
default:
......@@ -100,16 +91,10 @@ static VOID *PthreadF01(void *arg)
ICUNIT_ASSERT_STRING_EQUAL_RET(readbuf, "0123456789", readbuf, NULL);
ret = close(fd[index]);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
if (flag == 1) {
break;
}
index++;
}
if (flag == 0) {
index--;
}
for (i = index; i >= 0; i--) {
for (i = index - 1; i >= 0; i--) {
(void)snprintf_s(pathname, FAT_STANDARD_NAME_LENGTH, FAT_STANDARD_NAME_LENGTH, "%s/file1%d.txt", FAT_PATH_NAME,
i);
ret = unlink(pathname);
......@@ -135,7 +120,7 @@ EXIT:
static VOID *PthreadF02(void *arg)
{
INT32 i, j, ret, len, flag, index;
INT32 i, j, ret, len, index;
INT32 fd[100] = {};
CHAR pathname[FAT_STANDARD_NAME_LENGTH] = "";
CHAR filebuf[260] = "01234567890123456789abcedfghij9876543210abcdeabcde0123456789abcedfghij9876543210abcdeabcde0123"
......@@ -145,13 +130,12 @@ static VOID *PthreadF02(void *arg)
CHAR *bufWrite = nullptr;
struct stat statbuf;
flag = 0;
bufWrite = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_ASSERT_NOT_EQUAL_NULL(bufWrite, NULL, NULL);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -160,35 +144,27 @@ static VOID *PthreadF02(void *arg)
index);
fd[index] = open(pathname, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO);
if (fd[index] == -1) {
break;
index--;
ICUNIT_GOTO_NOT_EQUAL(fd[index], -1, fd[index], EXIT1);
}
switch (index % 3) { // mod 3
case 0:
for (j = 0; j < FAT_MAX_CYCLES; j++) { // 写满100M
len = write(fd[index], bufWrite, strlen(bufWrite));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(bufWrite), len, EXIT1);
}
LosTaskDelay(3); // delay 3 s
break;
case 1:
for (j = 0; j < FAT_MIDDLE_CYCLES; j++) { // 写满10M
len = write(fd[index], bufWrite, strlen(bufWrite));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(bufWrite), len, EXIT1);
}
LosTaskDelay(5); // delay 5 s
break;
case 2: // the 2 nd case
len = write(fd[index], writebuf, strlen(writebuf));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(writebuf), len, EXIT1);
LosTaskDelay(7); // delay 7 s
break;
default:
......@@ -202,17 +178,10 @@ static VOID *PthreadF02(void *arg)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
FatStatPrintf(statbuf);
if (flag == 1) {
break;
}
index++;
}
if (flag == 0) {
index--;
}
for (i = index; i >= 0; i--) {
for (i = index - 1; i >= 0; i--) {
(void)snprintf_s(pathname, FAT_STANDARD_NAME_LENGTH, FAT_STANDARD_NAME_LENGTH, "%s/file2%d.txt", FAT_PATH_NAME,
i);
ret = unlink(pathname);
......@@ -240,7 +209,7 @@ EXIT:
static VOID *PthreadF03(void *arg)
{
INT32 i, j, ret, len, flag, index;
INT32 i, j, ret, len, index;
INT32 fd[100] = {};
CHAR pathname[FAT_STANDARD_NAME_LENGTH] = "";
CHAR pathname1[FAT_STANDARD_NAME_LENGTH] = "";
......@@ -250,13 +219,12 @@ static VOID *PthreadF03(void *arg)
CHAR writebuf[20] = "0123456789";
CHAR *bufWrite = nullptr;
flag = 0;
bufWrite = (CHAR *)malloc(BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
ICUNIT_ASSERT_NOT_EQUAL_NULL(bufWrite, NULL, NULL);
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -265,35 +233,27 @@ static VOID *PthreadF03(void *arg)
index);
fd[index] = open(pathname, O_NONBLOCK | O_CREAT | O_RDWR | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO);
if (fd[index] == -1) {
break;
index--;
ICUNIT_GOTO_NOT_EQUAL(fd[index], -1, fd[index], EXIT1);
}
switch (index % 3) { // mod 3
case 0:
for (j = 0; j < FAT_MAX_CYCLES; j++) { // 写满100M
len = write(fd[index], bufWrite, strlen(bufWrite));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(bufWrite), len, EXIT1);
}
LosTaskDelay(3); // delay 3 s
break;
case 1:
for (j = 0; j < FAT_MIDDLE_CYCLES; j++) { // 写满10M
len = write(fd[index], bufWrite, strlen(bufWrite));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(bufWrite), len, EXIT1);
}
LosTaskDelay(5); // delay 5 s
break;
case 2: // the 2 nd case
len = write(fd[index], writebuf, strlen(writebuf));
if (len <= 0) {
flag = 1;
break;
}
ICUNIT_GOTO_EQUAL(len, strlen(writebuf), len, EXIT1);
LosTaskDelay(7); // delay 7 s
break;
default:
......@@ -308,16 +268,10 @@ static VOID *PthreadF03(void *arg)
ret = rename(pathname, pathname1);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
if (flag == 1) {
break;
}
index++;
}
if (flag == 0) {
index--;
}
for (i = index; i >= 0; i--) {
for (i = index - 1; i >= 0; i--) {
(void)snprintf_s(pathname, FAT_STANDARD_NAME_LENGTH, FAT_STANDARD_NAME_LENGTH, "%s/file3_%d.txt", FAT_PATH_NAME,
i);
ret = unlink(pathname);
......@@ -380,7 +334,7 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT1);
}
ICUNIT_ASSERT_EQUAL(g_testCount, 3, g_testCount); // there 3 threads
ICUNIT_GOTO_EQUAL(g_testCount, 3, g_testCount, EXIT); // there 3 threads
ret = rmdir(bufname);
ICUNIT_GOTO_EQUAL(ret, FAT_NO_ERROR, ret, EXIT);
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -159,7 +159,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -267,7 +267,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -49,7 +49,7 @@ static VOID *PthreadF01(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -158,7 +158,7 @@ static VOID *PthreadF02(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......@@ -266,7 +266,7 @@ static VOID *PthreadF03(void *arg)
(void)memset_s(bufWrite, BYTES_PER_MBYTES + 1, 0, BYTES_PER_MBYTES + 1); // BYTES_PER_MBYTES = 1MB
for (i = 0; i < BYTES_PER_KBYTES * 4; i++) { // loop in 4 Kb
(void)strcat_s(bufWrite, BYTES_PER_MBYTES, filebuf);
(void)strcat_s(bufWrite, BYTES_PER_MBYTES + 1, filebuf);
}
index = 0;
......
......@@ -39,7 +39,7 @@ static UINT32 TestCase(VOID)
INT32 ret;
INT32 fd = 0;
INT32 len = 0;
INT32 i = 0;
INT32 i = FAT_SHORT_ARRAY_LENGTH;
CHAR pathname1[FAT_STANDARD_NAME_LENGTH] = FAT_PATH_NAME;
CHAR buffile[FAT_STANDARD_NAME_LENGTH] = FAT_PATH_NAME;
CHAR filebuf[FAT_STANDARD_NAME_LENGTH] = "12345678901234567890";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册