Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
main.c File Reference
#include <ztest.h>

Functions

void test_isr_dynamic (void)
 
void test_nested_isr (void)
 
void test_prevent_interruption (void)
 Test interrupt prevention. More...
 
void test_isr_regular (void)
 
void test_isr_offload_job_multiple (void)
 Test interrupt offload work to multiple jobs. More...
 
void test_isr_offload_job_identi (void)
 Test interrupt offload work to identical jobs. More...
 
void test_isr_offload_job (void)
 Test interrupt offload work by dynamic interrupt. More...
 
void test_direct_interrupt (void)
 
void test_main (void)
 

Function Documentation

◆ test_direct_interrupt()

void test_direct_interrupt ( void  )

◆ test_isr_dynamic()

void test_isr_dynamic ( void  )

◆ test_isr_offload_job()

void test_isr_offload_job ( void  )

Test interrupt offload work by dynamic interrupt.

Validate isr can offload workload to work queue, and the offload jobs could execute immediately base on it's priority. We test this by dynamic interrupt.

◆ test_isr_offload_job_identi()

void test_isr_offload_job_identi ( void  )

Test interrupt offload work to identical jobs.

Validate isr can offload workload to work queue, and all the offload jobs use the same thread entry, and:

  • If the priority of the original thread < offload job, offload jobs could execute immediately.
  • If the priority of the original thread >= offload job, offload jobs will not execute immediately.

We test this by irq_offload().

◆ test_isr_offload_job_multiple()

void test_isr_offload_job_multiple ( void  )

Test interrupt offload work to multiple jobs.

Validate isr can offload workload to multi work queue, and:

  • If the priority of the original thread < offload job, offload jobs could execute immediately.
  • If the priority of the original thread >= offload job, offload jobs will not execute immediately.

We test this by irq_offload().

◆ test_isr_regular()

void test_isr_regular ( void  )

◆ test_main()

void test_main ( void  )

◆ test_nested_isr()

void test_nested_isr ( void  )

◆ test_prevent_interruption()

void test_prevent_interruption ( void  )

Test interrupt prevention.

This routine tests if the kernel is capable of preventing interruption, by locking interrupts and busy-waiting to see if the system timer interrupt is serviced while interrupts are locked; in addition, this test also verifies that the system timer interrupt is serviced after interrupts are unlocked.