test: ftl: add tests for ftl_read()
This commit is contained in:
parent
0d1ffa71fb
commit
bf1f0f4bee
4 changed files with 86 additions and 1 deletions
|
@ -28,7 +28,7 @@ size_t __wrap_flash_read(struct flash_dev *dev, uint32_t addr,
|
|||
if (len > ret_len)
|
||||
len = ret_len;
|
||||
|
||||
if (len)
|
||||
if (len && ret_data)
|
||||
memcpy(data, ret_data, len);
|
||||
|
||||
return len;
|
||||
|
@ -59,6 +59,8 @@ size_t __wrap_flash_write(struct flash_dev *dev, uint32_t addr,
|
|||
|
||||
size_t __wrap_flash_write0(struct flash_dev *dev, uint32_t addr, size_t len)
|
||||
{
|
||||
(void)dev;
|
||||
|
||||
check_expected(addr);
|
||||
check_expected(len);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue