tests/flash: Improve flash_get_size output on error
Now expected vs read size will be logged in case of error to make it easier to understand problem or correct test settings. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
fa1b93d148
commit
9dad01c6dd
1 changed files with 2 additions and 1 deletions
|
|
@ -331,7 +331,8 @@ ZTEST(flash_driver, test_get_size)
|
|||
uint64_t size;
|
||||
|
||||
zassert_ok(flash_get_size(flash_dev, &size));
|
||||
zassert_equal(size, CONFIG_TEST_DRIVER_FLASH_SIZE, "Unexpected size");
|
||||
zassert_equal(size, (uint64_t)CONFIG_TEST_DRIVER_FLASH_SIZE, "Expected %llu, got %llu\n",
|
||||
(uint64_t)CONFIG_TEST_DRIVER_FLASH_SIZE, size);
|
||||
#else
|
||||
/* The test is sipped only because there is no uniform way to get device size */
|
||||
ztest_test_skip();
|
||||
|
|
|
|||
Loading…
Reference in a new issue