Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Workqueue

Workqueue Tests. More...

Functions

void test_offload_workqueue (void)
 Verify thread context. More...
 
static void test_k_work_user_submit_to_queue_fail (void)
 Test k_work_user_submit_to_queue API. More...
 
static void test_work_user_queue_start_before_submit (void)
 Test user mode work queue start before submit. More...
 
static void test_user_workq_granted_access_setup (void)
 Setup object permissions before test_user_workq_granted_access() More...
 
static void test_user_workq_granted_access (void)
 Test user mode grant workqueue permissions. More...
 
static void test_user_work_submit_to_queue_thread (void)
 Test work submission to work queue (user mode) More...
 
static void delayed_test_items_init (void)
 
static void delayed_test_items_submit (void)
 
static void test_sequence (void)
 Test work queue items submission sequence. More...
 
static void test_resubmit (void)
 Test work queue item resubmission. More...
 
static void test_delayed_init (void)
 Test delayed work queue init. More...
 
static void test_delayed_submit (void)
 Test delayed workqueue submit. More...
 
static void test_delayed_cancel (void)
 Test work queue delayed cancel. More...
 
static void test_delayed (void)
 Test delayed work items. More...
 
static void test_triggered_init (void)
 Test triggered work queue init. More...
 
static void test_triggered_submit (k_timeout_t timeout)
 Test triggered workqueue submit. More...
 
static void test_triggered_trigger (void)
 Trigger triggered workqueue execution. More...
 
static void test_triggered (void)
 Test triggered work items. More...
 
static void test_already_triggered (void)
 Test already triggered work items. More...
 
static void test_triggered_resubmit (void)
 Test resubmission of triggered work queue item. More...
 
static void test_triggered_no_wait (void)
 Test triggered work items with K_NO_WAIT timeout. More...
 
static void test_triggered_no_wait_expired (void)
 Test expired triggered work items with K_NO_WAIT timeout. More...
 
static void test_triggered_wait (void)
 Test triggered work items with arbitrary timeout. More...
 
static void test_triggered_wait_expired (void)
 Test expired triggered work items with arbitrary timeout. More...
 
void test_delayed_work_define (void)
 Test delayed work queue define macro. More...
 

Detailed Description

Workqueue Tests.

Function Documentation

◆ delayed_test_items_init()

static void delayed_test_items_init ( void  )
static

◆ delayed_test_items_submit()

static void delayed_test_items_submit ( void  )
static

◆ test_already_triggered()

static void test_already_triggered ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test already triggered work items.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_delayed()

static void test_delayed ( void  )
static

◆ test_delayed_cancel()

static void test_delayed_cancel ( void  )
static

◆ test_delayed_init()

static void test_delayed_init ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test delayed work queue init.

See also
k_delayed_work_init()

◆ test_delayed_submit()

static void test_delayed_submit ( void  )
static

◆ test_delayed_work_define()

void test_delayed_work_define ( void  )

#include <tests/kernel/workq/work_queue/src/main.c>

Test delayed work queue define macro.

The macro should initialize the k_delayed_work exactly the same as k_delayed_work_init does.

See also
K_DELAYED_WORK_DEFINE()

◆ test_k_work_user_submit_to_queue_fail()

static void test_k_work_user_submit_to_queue_fail ( void  )
static

#include <tests/kernel/workq/user_work/src/main.c>

Test k_work_user_submit_to_queue API.

Function k_work_user_submit_to_queue() will return -EBUSY: if the work item was already in some workqueue and -ENOMEM: if no memory for thread resource pool allocation. Create two situation to meet the error return value.

See also
k_work_user_submit_to_queue()

◆ test_offload_workqueue()

void test_offload_workqueue ( void  )

#include <tests/kernel/workq/critical/src/main.c>

Verify thread context.

Check whether variable value per-thread is saved during context switch

◆ test_resubmit()

static void test_resubmit ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test work queue item resubmission.

See also
k_work_submit()

◆ test_sequence()

static void test_sequence ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test work queue items submission sequence.

See also
k_work_init(), k_work_submit()

◆ test_triggered()

static void test_triggered ( void  )
static

◆ test_triggered_init()

static void test_triggered_init ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test triggered work queue init.

See also
k_work_poll_init()

◆ test_triggered_no_wait()

static void test_triggered_no_wait ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test triggered work items with K_NO_WAIT timeout.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_triggered_no_wait_expired()

static void test_triggered_no_wait_expired ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test expired triggered work items with K_NO_WAIT timeout.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_triggered_resubmit()

static void test_triggered_resubmit ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test resubmission of triggered work queue item.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_triggered_submit()

static void test_triggered_submit ( k_timeout_t  timeout)
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test triggered workqueue submit.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_triggered_trigger()

static void test_triggered_trigger ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Trigger triggered workqueue execution.

◆ test_triggered_wait()

static void test_triggered_wait ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test triggered work items with arbitrary timeout.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_triggered_wait_expired()

static void test_triggered_wait_expired ( void  )
static

#include <tests/kernel/workq/work_queue/src/main.c>

Test expired triggered work items with arbitrary timeout.

See also
k_work_poll_init(), k_work_poll_submit()

◆ test_user_work_submit_to_queue_thread()

static void test_user_work_submit_to_queue_thread ( void  )
static

#include <tests/kernel/workq/user_work/src/main.c>

Test work submission to work queue (user mode)

See also
k_work_init(), k_work_is_pending(), k_work_submit_to_queue(), k_work_submit()

◆ test_user_workq_granted_access()

static void test_user_workq_granted_access ( void  )
static

#include <tests/kernel/workq/user_work/src/main.c>

Test user mode grant workqueue permissions.

See also
k_work_q_object_access_grant()

◆ test_user_workq_granted_access_setup()

static void test_user_workq_granted_access_setup ( void  )
static

◆ test_work_user_queue_start_before_submit()

static void test_work_user_queue_start_before_submit ( void  )
static

#include <tests/kernel/workq/user_work/src/main.c>

Test user mode work queue start before submit.

See also
k_work_user_queue_start()