Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/rmutex_cpp: refactor the test to avoid having to know the thread IDs #14254

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

keestux
Copy link
Contributor

@keestux keestux commented Jun 10, 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_cpp 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_cpp 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.

…d IDs

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 requested a review from miri64 as a code owner June 10, 2020 19:11
@keestux keestux requested a review from aabadie June 10, 2020 19:11
@aabadie aabadie added 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 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.

Changes are ok. Tested on native, samr21-xpro and arduino-mkr1000, all are working. It fails on master for the latter.

ACK

@aabadie aabadie merged commit 7a5ab96 into RIOT-OS:master Jun 11, 2020
@keestux keestux deleted the fix-test-rmutex_cpp branch June 11, 2020 18:16
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
@miri64 miri64 added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Jul 16, 2020
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.

3 participants