Skip to content

tests/periph_flashpage: add automated test for flash peripheral#10106

Merged
aabadie merged 2 commits into
RIOT-OS:masterfrom
fedepell:flash_autotest
Oct 4, 2018
Merged

tests/periph_flashpage: add automated test for flash peripheral#10106
aabadie merged 2 commits into
RIOT-OS:masterfrom
fedepell:flash_autotest

Conversation

@fedepell

@fedepell fedepell commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

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 test

in tests/periph_flashpage

Issues/PRs references

As discussed in #10069 to test the proposed PR.

@aabadie aabadie added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools Area: cpu Area: CPU/MCU ports labels Oct 3, 2018

@aabadie aabadie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/periph_flashpage/main.c Outdated
@fedepell

fedepell commented Oct 3, 2018

Copy link
Copy Markdown
Contributor Author

@aabadie : thanks for the feedback! I fixed the printf/puts, thanks!

I'll check flashpage_raw now!

@fedepell

fedepell commented Oct 3, 2018

Copy link
Copy Markdown
Contributor Author

@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 aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: CI Area: Continuous Integration of RIOT components CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Oct 3, 2018

@aabadie aabadie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@aabadie

aabadie commented Oct 4, 2018

Copy link
Copy Markdown
Contributor

All CI are green, let's merge. Thanks @fedepell, this is very useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Area: Continuous Integration of RIOT components Area: cpu Area: CPU/MCU ports Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants