mirror of https://github.com/wolfSSL/wolfBoot.git
F-12061: unit test: keep the XIP fast-path source in the flash model
PR review (wolfSSL/wolfBoot#880, Fenrir bot) flagged that test_aligned_page_multiple_write_xip filled its 512-byte source at offset 3 * FLASH_PAGE_SIZE (768) of the 1024-byte flash model, so both the fixture and the HAL's XIP staging read 256 bytes past the modeled region; it only passed because mmap rounds the mapping up to a full page. Move the source to pages 2-3 (offset 2 * FLASH_PAGE_SIZE) with the destination at pages 0-1: non-overlapping, fully inside the model. Verification: unit-rp2350-flash-write 6/6, full unit suite green.pull/880/head
parent
5e80903103
commit
634d67904c
|
|
@ -194,11 +194,11 @@ START_TEST(test_aligned_page_multiple_write_xip)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < 512; i++)
|
||||
g_flash[3 * FLASH_PAGE_SIZE + i] = (uint8_t)(0x80 ^ (i & 0x3F));
|
||||
g_flash[2 * FLASH_PAGE_SIZE + i] = (uint8_t)(0x80 ^ (i & 0x3F));
|
||||
|
||||
ck_assert_int_eq(hal_flash_write((uint32_t)XIP_BASE,
|
||||
(uint8_t *)(XIP_BASE +
|
||||
3 * FLASH_PAGE_SIZE),
|
||||
2 * FLASH_PAGE_SIZE),
|
||||
512), 0);
|
||||
ck_assert_int_eq(g_violations, 0);
|
||||
for (i = 0; i < 512; i++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue