tests/periph_flashpage: improve flashpage tests#10777
Merged
Merged
Conversation
-) verify correctness of data written by raw write test -) write to really last flash page and not last - 1 -) use flashpage_addr instead of manual calculation
aabadie
approved these changes
Jan 18, 2019
aabadie
left a comment
Contributor
There was a problem hiding this comment.
Tested this PR against several boards (arduino-zero, iotlab-m3, b-l072z-lwan1, nrf51dk, samr30-xpro) and I can confirm that it improves things: in master test_last doesn't write in the last page, in this PR it does.
Nothing to say about the code changes, they are fine.
ACK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Improvements of automatic tests in peripherals flashpage:
-) verify correctness of data written by raw write test (before no actual verification that data was correctly written was done)
-) write to really last flash page and not last - 1 (so name/doc is aligned with functionality and we are testing a more edge case, that is the real last page, than before)
-) use flashpage_addr instead of manual calculation of flash address (code cleanup)
The first two points came out while working on #10069 (the assert error in b8b8ffd would have been spotted before) but had time to go through the test just now.
Testing procedure
Just build and execute the test in periph_flashpage