1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/tests/thread_msg_block_wo_queue
Cenk Gündoğan ac1a645fd1
Merge pull request #8190 from kaspar030/name_tests_by_folder
tests: set APPLICATION from folder name
2017-12-01 11:39:19 +01:00
..
tests tests: fix python style 'E302 expected 2 blank lines, found 1' 2017-11-29 17:32:06 +01:00
main.c thread_msg_block_wo_queue: add README & pexpect script, extend comments 2017-03-07 09:06:42 -08:00
Makefile tests: remove redundant APPLICATION defines 2017-12-01 11:03:39 +01:00
README.md thread_msg_block_wo_queue: add README & pexpect script, extend comments 2017-03-07 09:06:42 -08:00

Background

Tests for the same situation as thread_msg_block_w_queue, but without an initialized message queue for the main thread:

This test application checks for the behavior reported in https://github.com/RIOT-OS/RIOT/issues/100:

Usually, when a thread (here sender_thread) sends a message to another thread (here the main thread) whose message queue already holds a message, the message of sender_thread is copied into main's message queue and sender_thread is set to STATUS_PENDING. However, this should not happen if sender_thread is currently in STATUS_REPLY_BLOCKED mode, since it is in the middle of a different, blocking send.

In the aforementioned issue, it was reported that this undesired behavior was happening. It has been fixed since, and this test ensures that it doesn't re-occur again.

Expected result

The output should look as follows:

sender_thread start
main thread alive

If you see

ERROR: sender_thread should be blocking

something went wrong.