Skip to content

Commit

Permalink
kvstore general_tests_phase_1/2 tests: Skip TDBStore if FlashIAP sect…
Browse files Browse the repository at this point in the history
…or size is non-uniform

By default TDBStore requires blocks to have the same size.
  • Loading branch information
LDong-Arm committed Sep 11, 2020
1 parent 577d450 commit 8910ec6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -101,6 +101,11 @@ static void kvstore_init()
TEST_ASSERT_EQUAL_ERROR_CODE(0, res);

if (kv_setup == TDBStoreSet) {
#if COMPONENT_FLASHIAP && !COMPONENT_SPIF && !COMPONENT_QSPIF && !COMPONENT_DATAFLASH && !COMPONENT_SD
// TDBStore requires two areas of equal size, do the check for FlashIAP
TEST_SKIP_UNLESS(MBED_CONF_TARGET_INTERNAL_FLASH_UNIFORM_SECTORS ||
(MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE != 0) && (MBED_CONF_FLASHIAP_BLOCK_DEVICE_BASE_ADDRESS != 0xFFFFFFFF))
#endif
if (erase_val == -1) {
flash_bd = new FlashSimBlockDevice(bd);
kvstore = new TDBStore(flash_bd);
Expand Down
Expand Up @@ -96,6 +96,11 @@ static void kvstore_init()
TEST_ASSERT_EQUAL_ERROR_CODE(0, res);

if (kv_setup == TDBStoreSet) {
#if COMPONENT_FLASHIAP && !COMPONENT_SPIF && !COMPONENT_QSPIF && !COMPONENT_DATAFLASH && !COMPONENT_SD
// TDBStore requires two areas of equal size
TEST_SKIP_UNLESS(MBED_CONF_TARGET_INTERNAL_FLASH_UNIFORM_SECTORS ||
(MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE != 0) && (MBED_CONF_FLASHIAP_BLOCK_DEVICE_BASE_ADDRESS != 0xFFFFFFFF))
#endif
if (erase_val == -1) {
flash_bd = new FlashSimBlockDevice(bd);
kvstore = new TDBStore(flash_bd);
Expand Down

0 comments on commit 8910ec6

Please sign in to comment.