diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index da118cdf713d54da8d955d2a94a80d36cf038877..f287a3435184ad6fdeb29e9f219ef9aa8089d288 100644 --- a/testsuites/unittest/BUILD.gn +++ b/testsuites/unittest/BUILD.gn @@ -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) { diff --git a/testsuites/unittest/fs/vfat2/BUILD.gn b/testsuites/unittest/fs/vfat/BUILD.gn similarity index 99% rename from testsuites/unittest/fs/vfat2/BUILD.gn rename to testsuites/unittest/fs/vfat/BUILD.gn index 47d650d17419f09a4c578a80aafd48f72bb8e258..cae4233e73e2d83a13c24f44a70c32ccbba691a7 100644 --- a/testsuites/unittest/fs/vfat2/BUILD.gn +++ b/testsuites/unittest/fs/vfat/BUILD.gn @@ -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 = [ diff --git a/testsuites/unittest/fs/vfat2/It_vfs_fat.h b/testsuites/unittest/fs/vfat/It_vfs_fat.h similarity index 99% rename from testsuites/unittest/fs/vfat2/It_vfs_fat.h rename to testsuites/unittest/fs/vfat/It_vfs_fat.h index a2e0c125ba140623692b68d283f3ee231bd2840b..e863e1fc296ab3cf478fddec82464c60353a22f9 100644 --- a/testsuites/unittest/fs/vfat2/It_vfs_fat.h +++ b/testsuites/unittest/fs/vfat/It_vfs_fat.h @@ -33,7 +33,6 @@ #define IT_VFS_FAT_H #include "osTest.h" -#include "syslog.h" #include "sys/uio.h" #include "utime.h" #include @@ -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 diff --git a/testsuites/unittest/fs/vfat2/VfsFatTest.cpp b/testsuites/unittest/fs/vfat/VfsFatTest.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/VfsFatTest.cpp rename to testsuites/unittest/fs/vfat/VfsFatTest.cpp index ba226ec423d965c13f75d863082bac18fa66d1ec..b87e7f31ee3078c33d1f5d5279a193ba164b7f61 100644 --- a/testsuites/unittest/fs/vfat2/VfsFatTest.cpp +++ b/testsuites/unittest/fs/vfat/VfsFatTest.cpp @@ -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 diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_066.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_066.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_066.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_066.cpp index 13c6071087691f04449a49ca50ae832e69f3ca99..8bd2ddec01317dbd7bc43b6a679c6e210de6406e 100644 --- a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_066.cpp +++ b/testsuites/unittest/fs/vfat/full/It_vfs_fat_066.cpp @@ -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) { diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_068.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_068.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_068.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_068.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_072.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_072.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_072.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_072.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_073.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_073.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_073.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_073.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_074.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_074.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_074.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_074.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_496.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_496.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_496.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_496.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_497.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_497.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_497.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_497.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_498.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_498.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_498.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_498.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_499.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_499.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_499.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_499.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_500.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_500.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_500.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_500.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_501.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_501.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_501.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_501.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_502.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_502.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_502.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_502.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_503.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_503.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_503.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_503.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_504.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_504.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_504.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_504.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_506.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_506.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_506.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_506.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_507.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_507.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_507.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_507.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_508.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_508.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_508.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_508.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_509.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_509.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_509.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_509.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_510.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_510.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_510.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_510.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_511.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_511.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_511.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_511.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_512.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_512.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_512.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_512.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_513.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_513.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_513.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_513.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_514.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_514.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_514.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_514.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_515.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_515.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_515.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_515.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_516.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_516.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_516.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_516.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_517.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_517.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_517.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_517.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_518.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_518.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_518.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_518.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_519.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_519.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_519.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_519.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_662.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_662.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_662.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_662.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_663.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_663.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_663.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_663.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_664.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_664.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_664.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_664.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_665.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_665.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_665.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_665.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_666.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_666.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_666.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_666.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_667.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_667.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_667.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_667.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_668.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_668.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_668.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_668.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_669.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_669.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_669.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_669.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_670.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_670.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_670.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_670.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_671.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_671.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_671.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_671.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_672.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_672.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_672.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_672.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_673.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_673.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_673.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_673.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_674.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_674.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_674.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_674.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_675.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_675.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_675.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_675.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_676.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_676.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_676.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_676.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_677.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_677.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_677.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_677.cpp index 51b2483c7ee3425556d5abda6104783ae23bb6b4..4c8dca7ad8dc46d151d51825872624bac7e92269 100644 --- a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_677.cpp +++ b/testsuites/unittest/fs/vfat/full/It_vfs_fat_677.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_678.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_678.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_678.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_678.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_679.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_679.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_679.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_679.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_680.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_680.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_680.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_680.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_681.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_681.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_681.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_681.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_682.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_682.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_682.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_682.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_683.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_683.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_683.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_683.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_684.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_684.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_684.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_684.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_685.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_685.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_685.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_685.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_686.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_686.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_686.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_686.cpp index cc5e1cf11bf569ccb3b96073a109c9af082aa459..33573f51a9de9d47fd8960914e184caa179654e7 100644 --- a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_686.cpp +++ b/testsuites/unittest/fs/vfat/full/It_vfs_fat_686.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_687.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_687.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_687.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_687.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_692.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_692.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_692.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_692.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_693.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_693.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_693.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_693.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_694.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_694.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_694.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_694.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_870.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_870.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_870.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_870.cpp index cf88c74fbabb1878671a2e38a4a26ce28437c758..aaec77687873a6f1b7a23e2fb5424117eb147cf1 100644 --- a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_870.cpp +++ b/testsuites/unittest/fs/vfat/full/It_vfs_fat_870.cpp @@ -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, diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_872.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_872.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_872.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_872.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_873.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_873.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_873.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_873.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_874.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_874.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_874.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_874.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_875.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_875.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_875.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_875.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_902.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_902.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_902.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_902.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_903.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_903.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_903.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_903.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_904.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_904.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_904.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_904.cpp diff --git a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_909.cpp b/testsuites/unittest/fs/vfat/full/It_vfs_fat_909.cpp similarity index 97% rename from testsuites/unittest/fs/vfat2/full/It_vfs_fat_909.cpp rename to testsuites/unittest/fs/vfat/full/It_vfs_fat_909.cpp index bba7944b728b441a7ea2d79e25a9b6793f47d000..28ce4c7997700c5a186ee9e62efb268df210775c 100644 --- a/testsuites/unittest/fs/vfat2/full/It_vfs_fat_909.cpp +++ b/testsuites/unittest/fs/vfat/full/It_vfs_fat_909.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_001.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_001.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_001.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_001.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_002.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_002.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_002.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_002.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_003.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_003.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_003.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_003.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_004.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_004.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_004.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_004.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_005.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_005.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_005.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_005.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_006.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_006.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_006.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_006.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_007.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_007.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_007.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_007.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_008.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_008.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_008.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_008.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_013.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_013.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_013.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_013.cpp index ed82e423343259d9c684acb302db2d5f379e552d..b71a9256af08b86dc4dcd71b5af91d3554c199e8 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_013.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_013.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_014.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_014.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_014.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_014.cpp index 2b0276f1d207542777febf51c2b55ee9a0200c66..1fe244bd237976011b2906f5ad93ef35a16980eb 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_014.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_014.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_015.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_015.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_015.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_015.cpp index dcdda2d48fa7096fb5093711acc98ed66e0d8ff3..39dced3d46f4626d3950917f1ab43f08050da02b 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_015.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_015.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_016.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_016.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_016.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_016.cpp index d47d8d662ed25962f902c346bcfc9894bd1234c5..c6f64ce2bb431ee7cf0a73887aa76ced13b6560e 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_performance_016.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_performance_016.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_029.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_029.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_029.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_029.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_030.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_030.cpp similarity index 86% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_030.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_030.cpp index a366f118b34ad607a3d5cdfe6f542caaf4680653..23f42249f37465051f541aab622f4efe7921a361 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_030.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_030.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_031.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_031.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_031.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_031.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_038.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_038.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_038.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_038.cpp index 72a6dfa3ee2a72ab6a4705b3f0a2715cba2e2ae8..a0d9531fc5087b09aa048437e19323064de4390c 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_038.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_038.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_040.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_040.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_040.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_040.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_041.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_041.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_041.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_041.cpp index 21ff9f4c6a45ee38b0c29a9ed3ddec63e93f4413..b85a244d363feb7100648eab48abb1453675d659 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_041.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_041.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_042.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_042.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_042.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_042.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_301.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_301.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_301.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_301.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_302.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_302.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_302.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_302.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_303.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_303.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_303.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_303.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_305.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_305.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_305.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_305.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_306.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_306.cpp similarity index 97% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_306.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_306.cpp index 469e061827883a59c38a04a3e2cb9cb6a84f378d..dd50831443e98a41a208020e5c602076cc145df0 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_306.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_306.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_309.cpp b/testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_309.cpp similarity index 100% rename from testsuites/unittest/fs/vfat2/pressure/It_fs_fat_pressure_309.cpp rename to testsuites/unittest/fs/vfat/pressure/It_fs_fat_pressure_309.cpp diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_003.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_003.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_003.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_003.cpp index ca93e97645c2220f4697bbc1ff7205a6a730b51e..05798938e702341641c6f890db14cc4db8ebd5b1 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_003.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_003.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_004.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_004.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_004.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_004.cpp index cf9b091e8e57c8b198e255ade97f9112f9e14f69..ca68b6b7480e15d731d32e06d7361a708dd05ef8 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_004.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_004.cpp @@ -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__); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_005.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_005.cpp similarity index 95% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_005.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_005.cpp index 0a063f657afcabc338b6c373f603125f11352ce2..adcbf5df86224e1fd3ae8fa1e4f79feb22dd752a 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_005.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_005.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_006.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_006.cpp similarity index 97% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_006.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_006.cpp index 29e2284189d5f5a68855d278d257495cda4154cc..4a3212f6936084c8414dccb89fc4effb593e0f93 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_006.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_006.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_008.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_008.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_008.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_008.cpp index 2e5b8a493a0712a691ba85bc5cde5bb160d52a3b..619eb95230a1a0f8481f361ac199dabaf3aeaf50 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_008.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_008.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_009.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_009.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_009.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_009.cpp index fa619d10871dab4cd4004e5deb59f31ef94a8ea2..6959b2a141db57e322cded0a78b59249519bceb1 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_009.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_009.cpp @@ -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 个文件 diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_010.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_010.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_010.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_010.cpp index 798f922de3ffe75b1dfd05660c12867dcae19ec5..a7e1f733be4db2bc78ca4a0cf361e20c5c99d9c7 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_010.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_010.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_012.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_012.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_012.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_012.cpp index fbb3acdcb734abd7ba389710a91d1737a3d48256..4dd8e105a8306bd159d5b5ac7961440b3aa62e63 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_012.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_012.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_014.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_014.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_014.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_014.cpp index a0dd652f9735648a09ecf943ac78db6716b33c2f..23824d53f05d3fb2344cc4fd9c8f6f173ef2ded2 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_014.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_014.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_016.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_016.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_016.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_016.cpp index 17c1f2ee888950810452715f404b44638905b7d0..7880ef627700eb2f77cd4112ebe4dde098093a7b 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_016.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_016.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_017.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_017.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_017.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_017.cpp index 4a87a7d2f238e4f3836d799e6b25878560dc6833..06d41d21b12a637b260d23a5401ae42e04b5cd7f 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_017.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_017.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_018.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_018.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_018.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_018.cpp index 3c19cf76095fa6994b04460199d4866ed4047f25..c66e24f08f364d8e157d8850de88182598e0d60e 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_018.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_018.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_019.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_019.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_019.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_019.cpp index 606a36fdce7e1b4c5960d50415b9971685c713c2..8e71f3bf97ea393fbb13a8fbe96e4fed04d941a5 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_019.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_019.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_020.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_020.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_020.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_020.cpp index 28fbcf23a0a7e054e63fb348563c6b37abad920b..0299cc5c8955560dddfcb5b0ad8e53365ef8e050 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_020.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_020.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_021.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_021.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_021.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_021.cpp index e9cde0f047a6a9920bf996de4b95306878e2900d..291163422bdfd6aac3669ddca1fceb811f36958e 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_021.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_021.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_022.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_022.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_022.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_022.cpp index 3a5273b4c0e1fdc4d25dbc4e2c9cac6f6b10da9c..6369422a945a9188d713f97d5a56883a5a269585 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_022.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_022.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_023.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_023.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_023.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_023.cpp index dc994c2a4902097b648cad3423ce8eb3f675105c..06b7a1fbc1a48e17b81788e4a2e8ae9980a77e40 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_023.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_023.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_024.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_024.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_024.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_024.cpp index a4e429bfca04a385765c7dde4bda3ab2bbd7be11..ad6d4e2725d461f98ffd4e08d2504b11ebf5c2bc 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_024.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_024.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_027.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_027.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_027.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_027.cpp index ea8858a8e63f3081735474dd1d4cdd3a761b51cd..0e36a7b0c4746536adc52453999add34a46fceb5 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_027.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_027.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_029.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_029.cpp similarity index 97% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_029.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_029.cpp index fd1003226294e60bdef7877bbfa2fb8f41b91b88..bc67be1e228dc8e175918fd28247aa371b5e6bf5 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_029.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_029.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_030.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_030.cpp similarity index 97% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_030.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_030.cpp index 66d04432dfbb9e5e755dcbc5b79832dfa6fbc48b..40a2180ef8f673157689019662b592d14f835d25 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_030.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_030.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_032.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_032.cpp similarity index 97% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_032.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_032.cpp index 93506b180cd0219e53ade972a6b87c56531ad256..5d9a68a3d56feb4246fa05a9152bd859bf1f964e 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_032.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_032.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_033.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_033.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_033.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_033.cpp index 38c5510564b5697f5dd73a17422783feb4a56cce..b5ac0acd0afed3cd342738ca4a4a1000dcebf07b 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_033.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_033.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_035.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_035.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_035.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_035.cpp index 67439785eb8df3634f264e29d0eeeb489fbd4a6a..623acc0002d94793a59d1445e25f45579ca63ee2 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_035.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_035.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_036.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_036.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_036.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_036.cpp index d9bbcba8ccdd7af126d83b0dd7c412a674dbe31c..16e66e5a5138b8be5c5c688d2f8c0aedcbe59f07 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_036.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_036.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_038.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_038.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_038.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_038.cpp index fd4d78b190826e5d24cb098ae56d6885c48a9765..0a43ba6cee85677e9eb326b03c9682a6db398590 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_038.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_038.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_039.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_039.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_039.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_039.cpp index 37cb5620b6dd52b09125cc9b4dffeef25cfebcb0..bd35dc083c7b892934fba45deb700398acc7a0dc 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_039.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_039.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_040.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_040.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_040.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_040.cpp index 460d1c05a25ff1832b755f58b57f0a9c8df3c2fb..a2dc3b993cfeebdad32d27c3831957649a1cc4b0 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_040.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_040.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_041.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_041.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_041.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_041.cpp index 520c3ffaf4c0fbbdfd69c22ae4e89a6dcda5988a..19f31f2d989e14234c37e10fad73953ff2377655 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_041.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_041.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_042.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_042.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_042.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_042.cpp index 8db6215de189c3464e78e162ccdfb359512fb48c..161ac28902e1b515b9a23f880f6e25ab1c22b539 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_042.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_042.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_043.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_043.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_043.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_043.cpp index 7699a7668d18f1d2493ebc9a941e3f9f8116d87f..a003fa337379c9480224d1ae8aad1c0e5a0c4852 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_043.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_043.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_044.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_044.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_044.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_044.cpp index 0af397d4ea860cf66fecefd5210849f1481331d8..14b9f3a3cd0cd5495095544a87eb376e9258ca6f 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_044.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_044.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_045.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_045.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_045.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_045.cpp index 54d726eae408818136d6fb72e7b7cec6cfc6973f..64d81794354a119d9c56027195a6c1c86c6b83b8 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_045.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_045.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_046.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_046.cpp similarity index 87% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_046.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_046.cpp index 8b4c640e336d83098f269b8f95172af9e23cb0bb..3bf81ed53abf5bbb280ab4454d9a0bbc2998a57b 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_046.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_046.cpp @@ -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); diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_047.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_047.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_047.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_047.cpp index 58e9b5dcd3b7d5bd3fdc1f18875ca1b94edc20f1..4b68477a9c5c65a35d22b34f6031a39369ba8548 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_047.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_047.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_048.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_048.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_048.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_048.cpp index bf6fde5052e121b24bc51c853f3626d57f7d85c6..deb6fa9b41e8c3910b22718dc3c5822f9a453f4a 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_048.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_048.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_049.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_049.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_049.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_049.cpp index 8a18abf312b1f1995ef08178250fa8877258271f..84a307c4112b4e4fe5a446752f3ae9e4a0a7d1ba 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_049.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_049.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_050.cpp b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_050.cpp similarity index 98% rename from testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_050.cpp rename to testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_050.cpp index d565ac09d6421d2390994a59637d5e3364cd196f..38f4ab95f9250f33bbe091137b81249e8d5ed9c4 100644 --- a/testsuites/unittest/fs/vfat2/pressure/It_vfs_fat_mutipthread_050.cpp +++ b/testsuites/unittest/fs/vfat/pressure/It_vfs_fat_mutipthread_050.cpp @@ -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; diff --git a/testsuites/unittest/fs/vfat2/smoke/It_vfs_fat_026.cpp b/testsuites/unittest/fs/vfat/smoke/It_vfs_fat_026.cpp similarity index 99% rename from testsuites/unittest/fs/vfat2/smoke/It_vfs_fat_026.cpp rename to testsuites/unittest/fs/vfat/smoke/It_vfs_fat_026.cpp index 7a4185266ae7ccf7693de2d65a3395d76817815c..b19fbe97b472f6242acb30e2c9c822544c666427 100644 --- a/testsuites/unittest/fs/vfat2/smoke/It_vfs_fat_026.cpp +++ b/testsuites/unittest/fs/vfat/smoke/It_vfs_fat_026.cpp @@ -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";