Open Laczen opened 1 year ago
Hi @de-nordic,
This issue, marked as an RFC, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person.
Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.
@Laczen you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.
Thanks!
Introduction
Zephyr uses flash devices for image and data storage. The properties of a flash device are defined in dts and sometimes hardcoded in the flash drivers. A good operation of these devices is vital for a good operation of zephyr.
Problem description
When new boards are added to the tree it is important that the configuration and operation of the flash devices is validated using a proper driver test. Lately several problems (#60724, #59029, #59797) have been discovered that show that not all drivers have been evaluated properly due to the lack of a proper flash device test.
Proposed change
Introduce a proper flash driver test that evaluates the configuration and proper operation of flash drivers. The tests should contain at least: a. Verification of the write-block-size and erase-value, b. Verification of writing data (including writing unaligned data to a correct aligned position), c. Verification of reading data (also unaligned reads), d. Verification of erase,
Detailed RFC
The test should be easy to configure without relying on existing board definition properties, so it is proposed that all tests would define a
test_partition
so that it is clear for the user what part of the flash will be changed/invalidated by the test. This test partition can be a defined in an overlay file for each boards by either a real partition definition or a alias to an existing partition. A conf overlay should be used to enable the correct drivers if e.g. external flash devices are to be tested.Concerns and Unresolved Questions
As it is clear that some of the boards that exist in tree have problems with their setup introducing this test might create failures that will require attention from developers/maintainers.
Alternatives
Leave it as is and wait for sporadic detection of configuration/driver errors.