Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Message Queue

Functions

void test_msgq_attrs_get (void)
 Test basic attributes of a message queue. More...
 
void test_msgq_user_attrs_get (void)
 Test basic attributes of a message queue. More...
 
void test_msgq_thread (void)
 Test thread to thread data passing via message queue. More...
 
void test_msgq_thread_overflow (void)
 Test thread to thread data passing via message queue. More...
 
void test_msgq_user_thread (void)
 Test user thread to kernel thread data passing via message queue. More...
 
void test_msgq_user_thread_overflow (void)
 Test thread to thread data passing via message queue. More...
 
void test_msgq_isr (void)
 Test thread to isr data passing via message queue. More...
 
void test_msgq_pend_thread (void)
 Test pending writer in msgq. More...
 
void test_msgq_alloc (void)
 Test k_msgq_alloc_init() More...
 
void test_msgq_empty (void)
 Get message from an empty queue. More...
 
void test_msgq_full (void)
 Put message to a full queue. More...
 
void test_msgq_put_fail (void)
 Test returned error code during writing in msgq. More...
 
void test_msgq_user_put_fail (void)
 Test returned error code during writing in msgq. More...
 
void test_msgq_get_fail (void)
 Test returned error code during reading from msgq. More...
 
void test_msgq_user_get_fail (void)
 Test returned error code during reading from msgq. More...
 
void test_msgq_purge_when_put (void)
 Test purge a message queue. More...
 
void test_msgq_user_purge_when_put (void)
 Test purge a message queue. More...
 

Detailed Description

Function Documentation

◆ test_msgq_alloc()

void test_msgq_alloc ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Test k_msgq_alloc_init()

Initialization and buffer allocation for msgq from resource pool with various parameters

See also
k_msgq_alloc_init(), k_msgq_cleanup()

Requesting buffer allocation from the test pool.

◆ test_msgq_attrs_get()

void test_msgq_attrs_get ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_attrs.c>

Test basic attributes of a message queue.

See also
k_msgq_get_attrs()

◆ test_msgq_empty()

void test_msgq_empty ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Get message from an empty queue.

  • A thread get message from an empty message queue will get a -ENOMSG if timeout is set to K_NO_WAIT
  • A thread get message from an empty message queue will be blocked if timeout is set to a positive value or K_FOREVER
See also
k_msgq_get()

◆ test_msgq_full()

void test_msgq_full ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Put message to a full queue.

  • A thread put message to a full message queue will get a -ENOMSG if timeout is set to K_NO_WAIT
  • A thread put message to a full message queue will be blocked if timeout is set to a positive value or K_FOREVER
See also
k_msgq_put()

◆ test_msgq_get_fail()

void test_msgq_get_fail ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_fail.c>

Test returned error code during reading from msgq.

See also
k_msgq_init(), k_msgq_put()

◆ test_msgq_isr()

void test_msgq_isr ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Test thread to isr data passing via message queue.

See also
k_msgq_init(), k_msgq_get(), k_msgq_put(), k_msgq_purge()

TESTPOINT: init via k_msgq_init

◆ test_msgq_pend_thread()

void test_msgq_pend_thread ( void  )

◆ test_msgq_purge_when_put()

void test_msgq_purge_when_put ( void  )

◆ test_msgq_put_fail()

void test_msgq_put_fail ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_fail.c>

Test returned error code during writing in msgq.

See also
k_msgq_init()

◆ test_msgq_thread()

void test_msgq_thread ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Test thread to thread data passing via message queue.

See also
k_msgq_init(), k_msgq_get(), k_msgq_put(), k_msgq_purge()

TESTPOINT: init via k_msgq_init

◆ test_msgq_thread_overflow()

void test_msgq_thread_overflow ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Test thread to thread data passing via message queue.

See also
k_msgq_init(), k_msgq_get(), k_msgq_put(), k_msgq_purge()

TESTPOINT: init via k_msgq_init

◆ test_msgq_user_attrs_get()

void test_msgq_user_attrs_get ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_attrs.c>

Test basic attributes of a message queue.

See also
k_msgq_get_attrs()

◆ test_msgq_user_get_fail()

void test_msgq_user_get_fail ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_fail.c>

Test returned error code during reading from msgq.

See also
k_msgq_alloc_init(), k_msgq_get()

◆ test_msgq_user_purge_when_put()

void test_msgq_user_purge_when_put ( void  )

◆ test_msgq_user_put_fail()

void test_msgq_user_put_fail ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_fail.c>

Test returned error code during writing in msgq.

See also
k_msgq_alloc_init()

◆ test_msgq_user_thread()

void test_msgq_user_thread ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Test user thread to kernel thread data passing via message queue.

See also
k_msgq_alloc_init(), k_msgq_get(), k_msgq_put(), k_msgq_purge()

◆ test_msgq_user_thread_overflow()

void test_msgq_user_thread_overflow ( void  )

#include <tests/kernel/msgq/msgq_api/src/test_msgq_contexts.c>

Test thread to thread data passing via message queue.

See also
k_msgq_alloc_init(), k_msgq_get(), k_msgq_put(), k_msgq_purge()