Skip to content

tests/bitarithm_timings: Fixed bugs#12714

Merged
aabadie merged 2 commits intoRIOT-OS:masterfrom
maribu:bitarithm_timings
Nov 15, 2019
Merged

tests/bitarithm_timings: Fixed bugs#12714
aabadie merged 2 commits intoRIOT-OS:masterfrom
maribu:bitarithm_timings

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Nov 14, 2019

Contribution description

Fixed bugs in tests/bitarithm_timings:

  • Prevent bitarithm_lsb() from being called with 0, as it loops forever then
  • Use C11 atomics for communication with IRQ context, instead of abusing volatile for stuff it is not meant to be used

Testing procedure

The test should now pass on ATmegas

Issues/PRs references

First item in #12651

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: tests Area: tests and testing framework labels Nov 14, 2019
@maribu maribu requested a review from aabadie November 14, 2019 20:23
@maribu maribu added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 14, 2019
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Nov 14, 2019

I think nobody started reviewing, so I squash the missing include in directly.

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this test for AVR platforms!
I just tested it with success on arduino-uno, atmega256rfr2-xpro, native and samr21-xpro. So from the functional point of view, this PR is good.

Murdock doesn't seem to have problem with the use of C11 atomic but is this change really necessary to fix the test ?

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Thanks a lot @maribu. The commit messages are very helpful to understand the change.

ACK and go!

@aabadie aabadie merged commit b6401c3 into RIOT-OS:master Nov 15, 2019
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Nov 15, 2019

Thanks for the review!

@maribu maribu deleted the bitarithm_timings branch November 15, 2019 20:35
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
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: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants