|
|
|
@ -29,8 +29,8 @@ static void test_read_page_desc1(void **state) |
|
|
|
|
expect_value(__wrap_flash_read, addr, (16 - 1) * 4 * KIB + |
|
|
|
|
sizeof(struct ftl_page_group)); |
|
|
|
|
expect_value(__wrap_flash_read, len, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
will_return(__wrap_flash_read, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
|
|
|
|
|
map.log2_pages_per_group = ilog2(16); |
|
|
|
|
map.log2_page_size = ilog2(4 * KIB); |
|
|
|
@ -53,8 +53,8 @@ static void test_read_page_desc2(void **state) |
|
|
|
|
expect_value(__wrap_flash_read, addr, (16 - 1) * 4 * KIB + |
|
|
|
|
sizeof(struct ftl_page_group) + 14 * sizeof(struct ftl_page_desc)); |
|
|
|
|
expect_value(__wrap_flash_read, len, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
will_return(__wrap_flash_read, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
|
|
|
|
|
map.log2_pages_per_group = ilog2(16); |
|
|
|
|
map.log2_page_size = ilog2(4 * KIB); |
|
|
|
@ -93,8 +93,8 @@ static void test_read_page_desc4(void **state) |
|
|
|
|
expect_value(__wrap_flash_read, addr, (32 - 1) * 4 * KIB + |
|
|
|
|
sizeof(struct ftl_page_group)); |
|
|
|
|
expect_value(__wrap_flash_read, len, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
will_return(__wrap_flash_read, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
|
|
|
|
|
map.log2_pages_per_group = ilog2(16); |
|
|
|
|
map.log2_page_size = ilog2(4 * KIB); |
|
|
|
@ -117,8 +117,8 @@ static void test_read_page_desc5(void **state) |
|
|
|
|
expect_value(__wrap_flash_read, addr, (32 - 1) * 4 * KIB + |
|
|
|
|
sizeof(struct ftl_page_group) + 14 * sizeof(struct ftl_page_desc)); |
|
|
|
|
expect_value(__wrap_flash_read, len, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
will_return(__wrap_flash_read, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
|
|
|
|
|
map.log2_pages_per_group = ilog2(16); |
|
|
|
|
map.log2_page_size = ilog2(4 * KIB); |
|
|
|
@ -157,8 +157,8 @@ static void test_read_page_desc7(void **state) |
|
|
|
|
expect_value(__wrap_flash_read, addr, (48 - 1) * 4 * KIB + |
|
|
|
|
sizeof(struct ftl_page_group)); |
|
|
|
|
expect_value(__wrap_flash_read, len, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
will_return(__wrap_flash_read, sizeof page_desc); |
|
|
|
|
will_return(__wrap_flash_read, &page_desc); |
|
|
|
|
|
|
|
|
|
map.log2_pages_per_group = ilog2(16); |
|
|
|
|
map.log2_page_size = ilog2(4 * KIB); |
|
|
|
|