Skip to content

tests/periph_flashpage: improve flashpage tests#10777

Merged
aabadie merged 1 commit into
RIOT-OS:masterfrom
fedepell:test_flashpage_enh_1
Jan 18, 2019
Merged

tests/periph_flashpage: improve flashpage tests#10777
aabadie merged 1 commit into
RIOT-OS:masterfrom
fedepell:test_flashpage_enh_1

Conversation

@fedepell

Copy link
Copy Markdown
Contributor

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

-) 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 aabadie added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 16, 2019
@aabadie aabadie added this to the Release 2019.01 milestone Jan 18, 2019

@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.

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

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

Labels

Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards 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.

2 participants