Commit 230920c
tests: emds: fix flash_area_write alignment for rram
Zephyr commit c7616308e69 added alignment validation
to nrf_rram_write() and nrf_rram_erase(). Write address
and length must be multiples of WRITE_LINE_SIZE (16 bytes).
In snapshot_make(), data length was rounded up to 4 bytes
(sizeof(uint32_t)) before flash_area_write(). This causes
-EINVAL on rram targets where write_block_size is 16 bytes.
Round up to write_block_size instead.
In test_allocation_if_data_garbaged(), garbage buffer was
sizeof(struct emds_data_entry) (4 bytes). Increase to
EMDS_FLASH_BLOCK_SIZE to satisfy write alignment.
Also fix misleading error string ("metadata" -> "data").
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>1 parent 2383e09 commit 230920c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| |||
0 commit comments