Skip to content

sys/test_utils/dummy_thread: initial commit#14227

Merged
bergzand merged 2 commits intoRIOT-OS:masterfrom
kaspar030:dummy_thread
Jun 9, 2020
Merged

sys/test_utils/dummy_thread: initial commit#14227
bergzand merged 2 commits intoRIOT-OS:masterfrom
kaspar030:dummy_thread

Conversation

@kaspar030
Copy link
Contributor

@kaspar030 kaspar030 commented Jun 8, 2020

Contribution description

While looking at # #14181, I needed a quick way to add a thread. So this dummy thread module was born. If used, the module will start a dummy thread that only sleeps, in auto_init().

Use like this, to trick tests that assume a constant number of threads:

USEMODULE+=dummy_thread make -Ctests/rmutex flash test.

This module is not used otherwise.

Testing procedure

Issues/PRs references

@kaspar030 kaspar030 added Area: tests Area: tests and testing framework Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Jun 8, 2020
@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 8, 2020
@bergzand bergzand self-assigned this Jun 9, 2020
Copy link
Member

@bergzand bergzand left a comment

Choose a reason for hiding this comment

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

Ack, please squash.

Are you sure we should skip the compile test?

@kaspar030
Copy link
Contributor Author

Are you sure we should skip the compile test?

it is not used anywhere...

@bergzand
Copy link
Member

bergzand commented Jun 9, 2020

it is not used anywhere...

I'm a bit hesistant with merging what is effectively dead code, but I don't really see the need to add a separate test for this. Does it make sense to add this as a default module to one of the tests, maybe just the unittests?

@kaspar030
Copy link
Contributor Author

Does it make sense to add this as a default module to one of the tests, maybe just the unittests?

OK, it'll increase RAM usage like if adding another idle thread, let's see if that's ok.

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Jun 9, 2020
@kaspar030
Copy link
Contributor Author

OK, it'll increase RAM usage like if adding another idle thread, let's see if that's ok.

I added it to tests/test_utils, seems most fitting.

kaspar030 added 2 commits June 9, 2020 13:25
This commit adds a module that just creates a thread that does nothing,
at boot time, in auto_init().
@bergzand bergzand merged commit 85a385e into RIOT-OS:master Jun 9, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
@kaspar030 kaspar030 deleted the dummy_thread branch September 9, 2020 08:13
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: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants