Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Fatal Handling

Functions

void test_fatal (void)
 Test the kernel fatal error handling works correctly.
 
void test_message_capture (void)
 This test case verifies when fatal error log message can be captured.
 
void test_fatal_no_mt (void)
 Verify the kernel fatal error handling works correctly.
 
void test_arm_esf_collection (void)
 Test to verify code fault handling in ISR execution context.
 

Detailed Description

Function Documentation

◆ test_arm_esf_collection()

void test_arm_esf_collection ( void )

#include </home/runner/work/safety-doc/zephyr/tests/arch/arm/arm_interrupt/src/arm_interrupt.c>

Test to verify code fault handling in ISR execution context.

◆ test_fatal()

void test_fatal ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/fatal/exception/src/main.c>

Test the kernel fatal error handling works correctly.

Manually trigger the crash with various ways and check that the kernel is handling that properly or not. Also the crash reason should match. Check for stack sentinel feature by overflowing the thread's stack and check for the exception.

◆ test_fatal_no_mt()

void test_fatal_no_mt ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/fatal/no-multithreading/src/main.c>

Verify the kernel fatal error handling works correctly.

Manually trigger the crash with various ways and check that the kernel is handling that properly or not. Also the crash reason should match.

◆ test_message_capture()

void test_message_capture ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/fatal/message_capture/src/main.c>

This test case verifies when fatal error log message can be captured.

Test Objective:

  • When the fatal error is triggered, if the debugging message function is turned on, the system can capture the log information.

Prerequisite Conditions:

  • N/A

Input Specifications:

  • N/A

Test Procedure:

  1. Writing a function deliberately triggers a koops exception.
  2. When the log module is enabled, it will log some information in the process of exception.
  3. The regex in testcase.yaml verify the kernel will dump thread id information and error type when exception occurs.

Expected Test Result:

  • The expected log message is caught.

Pass/Fail Criteria:

  • Success if the log matching regex in step 3.
  • Failure if the log is not matching regex in step 3.

Assumptions and Constraints:

  • N/A