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/cond_order: refactor the test to avoid knowing the thread IDs #14228

Merged
merged 1 commit into from
Jun 9, 2020

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/cond_order 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/cond_order 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 15:33
@keestux
Copy link
Contributor Author

keestux commented Jun 8, 2020

Testing this PR could make use of #14227

@keestux
Copy link
Contributor Author

keestux commented Jun 9, 2020

@aabadie can you give your blessing. There are two/three more PRs waiting on this. And finally I like to get my board added when I'm satisfied with all relevant tests.

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.

Tested with success on native and on esp32-wroom-32.

All good to me. ACK

Thanks for cleaning up this Python script.

@aabadie
Copy link
Contributor

aabadie commented Jun 9, 2020

Please squash!

@aabadie aabadie added the Area: tests Area: tests and testing framework label Jun 9, 2020
@aabadie
Copy link
Contributor

aabadie commented Jun 9, 2020

I also confirm that the test is now working on arduino-mkr1000.

@aabadie aabadie added 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) and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 9, 2020
@aabadie aabadie self-assigned this 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.
@aabadie aabadie force-pushed the fix-test-cond-order branch from 9239215 to 765c216 Compare June 9, 2020 14:30
@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 9, 2020
@aabadie
Copy link
Contributor

aabadie commented Jun 9, 2020

To save you some time, I squashed and forced push the PR. Let's now wait for Murdock :)

@aabadie aabadie merged commit 28b558e into RIOT-OS:master Jun 9, 2020
@keestux keestux deleted the fix-test-cond-order branch June 9, 2020 20:49
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 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: 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