tests/periph_flashpage: add automated test for flash peripheral#10106
Conversation
743f3ec to
34d292e
Compare
aabadie
left a comment
There was a problem hiding this comment.
Thanks @fedepell, it looks good and exactly what is required.
It could still be further improved by also testing the flashpage_raw feature but that could be done in a follow-up (except if you want to look at that here).
Also tested and works as expected.
34d292e to
2edfcdf
Compare
|
@aabadie : thanks for the feedback! I fixed the printf/puts, thanks! I'll check flashpage_raw now! |
cd56de3 to
7a63a0e
Compare
7a63a0e to
b4f2c1a
Compare
|
@aabadie : I added a test also for a short write with flashpage_raw. As this is not supported by all HW the test first checks if it is available (by checking help contents) and then calls it eventually. I added a new command in the shell for simplicity, not to have to do a too long parsing to calculate the last page. |
aabadie
left a comment
There was a problem hiding this comment.
Code changes are good. Nothing to say there.
I tested this PR on several IoT-LAB nodes (samr21, st-lrwan1, m3, arduino-zero) and all have passed.
ACK
|
All CI are green, let's merge. Thanks @fedepell, this is very useful! |
Contribution description
Add a simple automatic test for flash peripheral as discussed in #10069. The test will do an erase/write/read/compare cycle using the flashpage_write_and_verify() function on the last page of the flash available. The last page is used to try to be hardware independant.
Testing procedure
Execute:
make flash testin tests/periph_flashpage
Issues/PRs references
As discussed in #10069 to test the proposed PR.