Skip to content

Commit 6db7b43

Browse files
nvlsianpucarlescufi
authored andcommitted
test: subsys: storage: flash_map: fix test of get sectors API
Test of f. flash_area_get_sectors was failing because parameter for passing capacity of the sectors array was uninitialized. This patch fix this bug. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent 5229f87 commit 6db7b43

File tree

1 file changed

+1
-0
lines changed
  • tests/subsys/storage/flash_map/src

1 file changed

+1
-0
lines changed

tests/subsys/storage/flash_map/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ void flash_map_test_case_2(void)
4343

4444
memset(wd, 0xa5, sizeof(wd));
4545

46+
sec_cnt = ARRAY_SIZE(fs_sectors);
4647
rc = flash_area_get_sectors(FLASH_AREA_IMAGE_1, &sec_cnt, fs_sectors);
4748
zassert_true(rc == 0, "flash_area_get_sectors failed");
4849

0 commit comments

Comments
 (0)