Replies: 1 comment
-
tests/drivers/flash/common/src/main.c in ZTEST(flash_driver, test_flash_erase) : diff --git a/tests/drivers/flash/common/src/main.c b/tests/drivers/flash/common/src/main.c
index ab0e63bb609..2f62c06fdfc 100644
--- a/tests/drivers/flash/common/src/main.c
+++ b/tests/drivers/flash/common/src/main.c
@@ -297,6 +297,7 @@ ZTEST(flash_driver, test_flash_erase)
/* Cross check - confirm that expected data is pseudo-random */
zassert_not_equal(read_buf[0], expected[1], "These values shall be different");
+#ifndef CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE
/* Erase a nb of pages aligned to the EXPECTED_SIZE */
rc = flash_erase(
flash_dev, page_info.start_offset,
@@ -320,6 +321,7 @@ ZTEST(flash_driver, test_flash_erase)
* doesn't contain erase_value
*/
zassert_not_equal(expected[0], erase_value, "These values shall be different");
+#endif /* CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE */
}
struct test_cb_data_type { |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the tests/drivers/flash/common/ the test_flash_erase usecase is checking the "erase operation" by comparing read values after erase to "erase_value". However in case the "CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE" is set, that comparison is meaningless
and it should skip the comparison
is it correct undestanding of CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE ?
Beta Was this translation helpful? Give feedback.
All reactions