From a8384b5db2274d50a350910d7cfd3fc36b4f4103 Mon Sep 17 00:00:00 2001 From: Far Date: Sat, 26 Jun 2021 10:13:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=86=85?= =?UTF-8?q?=E6=A0=B8=E7=9A=84VFAT=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复内容包括如下: 1. 将memset_s中buffer的大小设置正确; 2. 将用例文件夹名由vfat2修改为vfat; 3. 修复了vfat用例在SetUpTestcase和TearDownTestCase; 4. 全局变量g_fatFilesystem在初始化时设置为2(即FAT32); Close #I3XF3R Signed-off-by: Far --- testsuites/unittest/BUILD.gn | 6 +- .../unittest/fs/{vfat2 => vfat}/BUILD.gn | 2 +- .../unittest/fs/{vfat2 => vfat}/It_vfs_fat.h | 5 +- .../fs/{vfat2 => vfat}/VfsFatTest.cpp | 42 ++++---- .../{vfat2 => vfat}/full/It_vfs_fat_066.cpp | 2 +- .../{vfat2 => vfat}/full/It_vfs_fat_068.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_072.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_073.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_074.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_496.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_497.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_498.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_499.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_500.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_501.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_502.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_503.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_504.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_506.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_507.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_508.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_509.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_510.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_511.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_512.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_513.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_514.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_515.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_516.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_517.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_518.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_519.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_662.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_663.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_664.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_665.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_666.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_667.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_668.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_669.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_670.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_671.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_672.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_673.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_674.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_675.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_676.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_677.cpp | 4 - .../{vfat2 => vfat}/full/It_vfs_fat_678.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_679.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_680.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_681.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_682.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_683.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_684.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_685.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_686.cpp | 2 +- .../{vfat2 => vfat}/full/It_vfs_fat_687.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_692.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_693.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_694.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_870.cpp | 2 +- .../{vfat2 => vfat}/full/It_vfs_fat_872.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_873.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_874.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_875.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_902.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_903.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_904.cpp | 0 .../{vfat2 => vfat}/full/It_vfs_fat_909.cpp | 4 +- .../pressure/It_fs_fat_performance_001.cpp | 0 .../pressure/It_fs_fat_performance_002.cpp | 0 .../pressure/It_fs_fat_performance_003.cpp | 0 .../pressure/It_fs_fat_performance_004.cpp | 0 .../pressure/It_fs_fat_performance_005.cpp | 0 .../pressure/It_fs_fat_performance_006.cpp | 0 .../pressure/It_fs_fat_performance_007.cpp | 0 .../pressure/It_fs_fat_performance_008.cpp | 0 .../pressure/It_fs_fat_performance_013.cpp | 2 +- .../pressure/It_fs_fat_performance_014.cpp | 2 +- .../pressure/It_fs_fat_performance_015.cpp | 6 +- .../pressure/It_fs_fat_performance_016.cpp | 6 +- .../pressure/It_fs_fat_pressure_029.cpp | 0 .../pressure/It_fs_fat_pressure_030.cpp | 24 ++--- .../pressure/It_fs_fat_pressure_031.cpp | 0 .../pressure/It_fs_fat_pressure_038.cpp | 8 +- .../pressure/It_fs_fat_pressure_040.cpp | 0 .../pressure/It_fs_fat_pressure_041.cpp | 4 +- .../pressure/It_fs_fat_pressure_042.cpp | 0 .../pressure/It_fs_fat_pressure_301.cpp | 0 .../pressure/It_fs_fat_pressure_302.cpp | 0 .../pressure/It_fs_fat_pressure_303.cpp | 0 .../pressure/It_fs_fat_pressure_305.cpp | 0 .../pressure/It_fs_fat_pressure_306.cpp | 4 +- .../pressure/It_fs_fat_pressure_309.cpp | 0 .../pressure/It_vfs_fat_mutipthread_003.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_004.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_005.cpp | 18 ++-- .../pressure/It_vfs_fat_mutipthread_006.cpp | 18 ++-- .../pressure/It_vfs_fat_mutipthread_008.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_009.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_010.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_012.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_014.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_016.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_017.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_018.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_019.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_020.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_021.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_022.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_023.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_024.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_027.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_029.cpp | 8 +- .../pressure/It_vfs_fat_mutipthread_030.cpp | 8 +- .../pressure/It_vfs_fat_mutipthread_032.cpp | 8 +- .../pressure/It_vfs_fat_mutipthread_033.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_035.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_036.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_038.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_039.cpp | 8 +- .../pressure/It_vfs_fat_mutipthread_040.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_041.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_042.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_043.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_044.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_045.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_046.cpp | 96 +++++-------------- .../pressure/It_vfs_fat_mutipthread_047.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_048.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_049.cpp | 6 +- .../pressure/It_vfs_fat_mutipthread_050.cpp | 6 +- .../{vfat2 => vfat}/smoke/It_vfs_fat_026.cpp | 2 +- 134 files changed, 212 insertions(+), 265 deletions(-) rename testsuites/unittest/fs/{vfat2 => vfat}/BUILD.gn (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/It_vfs_fat.h (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/VfsFatTest.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_066.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_068.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_072.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_073.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_074.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_496.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_497.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_498.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_499.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_500.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_501.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_502.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_503.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_504.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_506.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_507.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_508.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_509.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_510.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_511.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_512.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_513.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_514.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_515.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_516.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_517.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_518.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_519.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_662.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_663.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_664.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_665.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_666.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_667.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_668.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_669.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_670.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_671.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_672.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_673.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_674.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_675.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_676.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_677.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_678.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_679.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_680.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_681.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_682.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_683.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_684.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_685.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_686.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_687.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_692.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_693.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_694.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_870.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_872.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_873.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_874.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_875.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_902.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_903.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_904.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/full/It_vfs_fat_909.cpp (97%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_001.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_002.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_003.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_004.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_005.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_006.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_007.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_008.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_013.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_014.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_015.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_performance_016.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_029.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_030.cpp (86%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_031.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_038.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_040.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_041.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_042.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_301.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_302.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_303.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_305.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_306.cpp (97%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_fs_fat_pressure_309.cpp (100%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_003.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_004.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_005.cpp (95%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_006.cpp (97%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_008.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_009.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_010.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_012.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_014.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_016.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_017.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_018.cpp (99%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_019.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_020.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_021.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_022.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_023.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_024.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_027.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_029.cpp (97%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_030.cpp (97%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_032.cpp (97%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_033.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_035.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_036.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_038.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_039.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_040.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_041.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_042.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_043.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_044.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_045.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_046.cpp (87%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_047.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_048.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_049.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/pressure/It_vfs_fat_mutipthread_050.cpp (98%) rename testsuites/unittest/fs/{vfat2 => vfat}/smoke/It_vfs_fat_026.cpp (99%) diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index da118cdf..f287a343 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 47d650d1..cae4233e 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 a2e0c125..e863e1fc 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 ba226ec4..b87e7f31 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 13c60710..8bd2ddec 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 51b2483c..4c8dca7a 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 cc5e1cf1..33573f51 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 cf88c74f..aaec7768 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 bba7944b..28ce4c79 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 ed82e423..b71a9256 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 2b0276f1..1fe244bd 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 dcdda2d4..39dced3d 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 d47d8d66..c6f64ce2 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 a366f118..23f42249 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 72a6dfa3..a0d9531f 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 21ff9f4c..b85a244d 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 469e0618..dd508314 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 ca93e976..05798938 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 cf9b091e..ca68b6b7 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 0a063f65..adcbf5df 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 29e22841..4a3212f6 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 2e5b8a49..619eb952 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 fa619d10..6959b2a1 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 798f922d..a7e1f733 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 fbb3acdc..4dd8e105 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 a0dd652f..23824d53 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 17c1f2ee..7880ef62 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 4a87a7d2..06d41d21 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 3c19cf76..c66e24f0 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 606a36fd..8e71f3bf 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 28fbcf23..0299cc5c 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 e9cde0f0..29116342 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 3a5273b4..6369422a 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 dc994c2a..06b7a1fb 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 a4e429bf..ad6d4e27 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 ea8858a8..0e36a7b0 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 fd100322..bc67be1e 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 66d04432..40a2180e 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 93506b18..5d9a68a3 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 38c55105..b5ac0acd 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 67439785..623acc00 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 d9bbcba8..16e66e5a 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 fd4d78b1..0a43ba6c 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 37cb5620..bd35dc08 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 460d1c05..a2dc3b99 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 520c3ffa..19f31f2d 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 8db6215d..161ac289 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 7699a766..a003fa33 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 0af397d4..14b9f3a3 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 54d726ea..64d81794 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 8b4c640e..3bf81ed5 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 58e9b5dc..4b68477a 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 bf6fde50..deb6fa9b 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 8a18abf3..84a307c4 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 d565ac09..38f4ab95 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 7a418526..b19fbe97 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"; -- GitLab