Skip to content

tests/rmutex: refactor the test to avoid having to know the thread IDs#14230

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
keestux:fix-test-rmutex
Jun 10, 2020
Merged

tests/rmutex: refactor the test to avoid having to know the thread IDs#14230
aabadie merged 1 commit intoRIOT-OS:masterfrom
keestux:fix-test-rmutex

Conversation

@keestux
Copy link
Contributor

@keestux keestux commented Jun 8, 2020

Contribution description

When CDC ACM is used as stdio the first thread in the test may have a
different ID than #3. The test code will now look at the printed thread
information (id, prio) as they are created. This avoids the need for a
table with ID/prio.

Testing procedure

Run tests/rmutex with compile_and_test_for_board. Choose a board which uses CDC ACM as stdio. That means there are three threads active when the test starts. The test should succeed.

Run tests/rmutex with compile_and_test_for_board. Choose a board which uses standard UART for stdio (no CDC ACM). That means there are two threads active when the test starts. The test should succeed.

Issues/PRs references

A similar problem was solved in #14181

@keestux keestux requested a review from miri64 as a code owner June 8, 2020 18:51
@keestux
Copy link
Contributor Author

keestux commented Jun 8, 2020

And yes, I will consider the same comments as in #14228

@miri64 miri64 requested review from bergzand and kaspar030 June 9, 2020 07:38
@miri64 miri64 added Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: tests Area: tests and testing framework Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) and removed Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system labels Jun 9, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jun 9, 2020
When CDC ACM is used as stdio the first thread in the test may have a
different ID than RIOT-OS#3. The test code will now look at the printed thread
information (id, prio) as they are created. This avoids the need for a
table with ID/prio.
@keestux keestux force-pushed the fix-test-rmutex branch from 553c2a4 to b9efe4e Compare June 9, 2020 21:06
@keestux keestux requested a review from aabadie June 9, 2020 21:06
@keestux
Copy link
Contributor Author

keestux commented Jun 9, 2020

@aabadie I applied the same changes as you requested in #14228 and I took the liberty to rebase and squash

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 10, 2020
Copy link
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.

Looks good and now it works on arduino-mkr1000. It also still works on samr21-xpro and native.

ACK!

@aabadie aabadie merged commit d62bcc2 into RIOT-OS:master Jun 10, 2020
@keestux keestux deleted the fix-test-rmutex branch June 10, 2020 18:59
@aabadie aabadie self-assigned this Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: core Area: RIOT kernel. Handle PRs marked with this with care! 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