Skip to content

Commit a88e429

Browse files
hakehuangkartben
authored andcommitted
tests: fat: fat_fs_api reduce the wipe partition sectors
As SD partition tables, GPT or MBT, is positioned at the beginning of a device, it is enough to wipe first 64 sectors, of 512 bytes. Wipe of entire SD card is very slow and unnecessary. fixes: #84428 Signed-off-by: Hake Huang <[email protected]>
1 parent 11ddf11 commit a88e429

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/subsys/fs/fat_fs_api/src/common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ int wipe_partition(void)
8989
return TC_FAIL;
9090
}
9191

92+
if (sector_count > 64) {
93+
/* partition only in first 32k */
94+
sector_count = 64;
95+
}
9296
sector_wr_size = MIN(sector_size, ARRAY_SIZE(erase_buffer));
9397
sector_wr_jmp = sector_wr_size / sector_wr_size;
9498
TC_PRINT("For "DISK_NAME" using sector write size %"PRIu32" to write %"PRIu32" at once\n",

0 commit comments

Comments
 (0)