tests/mutex_order: refactor the test to avoid knowing the thread IDs#14229
Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom Jun 10, 2020
Merged
tests/mutex_order: refactor the test to avoid knowing the thread IDs#14229aabadie merged 1 commit intoRIOT-OS:masterfrom
aabadie merged 1 commit intoRIOT-OS:masterfrom
Conversation
Contributor
Author
|
Testing this PR could make use of #14227 |
aabadie
reviewed
Jun 8, 2020
tests/mutex_order/tests/01-run.py
Outdated
| 6: 2, | ||
| 7: 1 | ||
| } | ||
| NR_THREADS = 5 |
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.
39e86a5 to
fd01fde
Compare
Contributor
Author
aabadie
approved these changes
Jun 10, 2020
Contributor
aabadie
left a comment
There was a problem hiding this comment.
Code changes are good. Tested on native, samr21-xpro and arduino-mkr1000: all successful. On master it fails for the latter.
ACK!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/mutex_orderwithcompile_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/mutex_orderwithcompile_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